You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can set the width in the png_image structure directly, and also we may get an zero width image by the API invoking of png_image_begin_read_from_memory, as the example shown.
The text was updated successfully, but these errors were encountered:
hopper-vul
changed the title
Division by zero error error in png_image_write_main if Image width is zero
Division by zero error in png_image_write_main if Image width is zero
Aug 10, 2023
In png_image_write_main, the function checks overflow by :
if the
width
is zero in image structure, the png_row_stride will be zero, and it brings a division by zero error.we can reproduce the error by calling API functions
png_image_write_to_stdio
,png_image_write_to_memory
andpng_image_write_to_file
.For example.
We can set the
width
in thepng_image
structure directly, and also we may get an zero width image by the API invoking ofpng_image_begin_read_from_memory
, as the example shown.The text was updated successfully, but these errors were encountered: