Skip to content

tiffcrop: fix asan runtime error caused by integer promotion

Thomas Bernard requested to merge miniupnp/libtiff:int-shift into master

tiffcrop.c:4027:20: runtime error: left shift of 190 by 24 places cannot be represented in type 'int'

C treats (byte << 24) as an int expression. casting explicitly to unsigned type uint32 avoids the problem.

the same issue has been fixed elsewhere with a2421369

I detected the bug with the test file of #86 (closed)

Merge request reports