From 13bdd8bcdf2cec388c734271252ef1dade52ff57 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 5 Oct 2016 19:34:09 -0500 Subject: [libpng16] Imported from libpng-1.6.26beta05.tar --- pngwrite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pngwrite.c') 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"); } -- cgit v1.2.1