From ea9249fe5be7ab916093b152429bacdc3655b8b1 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Wed, 8 Jan 2014 12:05:00 -0600 Subject: [PATCH] [libpng15] Only warn about image too wide if warning was not already issued. --- png.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/png.c b/png.c index 07da96dc7..1642b5eb5 100644 --- a/png.c +++ b/png.c @@ -658,13 +658,13 @@ png_get_copyright(png_const_structp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.5.18beta04 - January 1, 2014" PNG_STRING_NEWLINE \ + "libpng version 1.5.18beta04 - January 8, 2014" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ PNG_STRING_NEWLINE; # else - return "libpng version 1.5.18beta04 - January 1, 2014\ + return "libpng version 1.5.18beta04 - January 8, 2014\ Copyright (c) 1998-2014 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; @@ -1222,13 +1222,14 @@ png_check_IHDR(png_structp png_ptr, error = 1; } - if (width > (PNG_UINT_32_MAX + if (error == 0 && width > (PNG_UINT_32_MAX >> 3) /* 8-byte RGBA pixels */ - 48 /* bigrowbuf hack */ - 1 /* filter byte */ - 7*8 /* rounding of width to multiple of 8 pixels */ - 8) /* extra max_pixel_depth pad */ - png_warning(png_ptr, "Width is too large for libpng to process pixels"); + png_warning(png_ptr, + "Width may be too large for libpng to process pixels"); /* Check other values */ if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&