diff options
author | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2016-10-05 19:34:09 -0500 |
---|---|---|
committer | Glenn Randers-Pehrson <glennrp at users.sourceforge.net> | 2016-10-05 19:43:35 -0500 |
commit | 13bdd8bcdf2cec388c734271252ef1dade52ff57 (patch) | |
tree | 288e89edfc2dcc2615fbb47a8cd374ba653098d0 /pngwrite.c | |
parent | 7d7694ae6a57cbe3e90c117b13663a6597fb44ea (diff) | |
download | libpng-13bdd8bcdf2cec388c734271252ef1dade52ff57.tar.gz |
[libpng16] Imported from libpng-1.6.26beta05.tarv1.6.26beta05
Diffstat (limited to 'pngwrite.c')
-rw-r--r-- | pngwrite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pngwrite.c b/pngwrite.c index e35409962..5682da2f7 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1942,7 +1942,7 @@ png_image_write_main(png_voidp argument) { const unsigned int channels = PNG_IMAGE_PIXEL_CHANNELS(image->format); - if (image->width <= 0x7FFFFFFFU/channels) /* no overflow */ + if (image->width <= 0x7fffffffU/channels) /* no overflow */ { png_uint_32 check; const png_uint_32 png_row_stride = image->width * channels; @@ -1962,7 +1962,7 @@ png_image_write_main(png_voidp argument) * limits the whole image size to 32 bits for API compatibility with * the current, 32-bit, PNG_IMAGE_BUFFER_SIZE macro. */ - if (image->height > 0xFFFFFFFF/png_row_stride) + if (image->height > 0xffffffffU/png_row_stride) png_error(image->opaque->png_ptr, "memory image too large"); } |