[libpng16] Removed potentially misleading warning from png_check_IHDR().

This commit is contained in:
Glenn Randers-Pehrson 2014-01-10 06:18:31 -06:00
parent 4ea97d8bc7
commit 88cf760b07
3 changed files with 2 additions and 15 deletions

View File

@ -61,8 +61,7 @@ Version 1.6.9beta02 [January 1, 2014]
rearrangement of Makefile.am allow creation of these links to be disabled. rearrangement of Makefile.am allow creation of these links to be disabled.
Version 1.6.9beta03 [January 10, 2014] Version 1.6.9beta03 [January 10, 2014]
Revised png_check_IHDR() to use PNG_SIZE_MAX instead of PNG_UINT_32_MAX Removed potentially misleading warning from png_check_IHDR().
in the test for potential overflow in PNG_ROWBYTES.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -4786,8 +4786,7 @@ Version 1.6.9beta02 [January 1, 2014]
rearrangement of Makefile.am allow creation of these links to be disabled. rearrangement of Makefile.am allow creation of these links to be disabled.
Version 1.6.9beta03 [January 10, 2014] Version 1.6.9beta03 [January 10, 2014]
Revised png_check_IHDR() to use PNG_SIZE_MAX instead of PNG_UINT_32_MAX Removed potentially misleading warning from png_check_IHDR().
in the test for potential overflow in PNG_ROWBYTES.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

11
png.c
View File

@ -2473,17 +2473,6 @@ png_check_IHDR(png_const_structrp png_ptr,
error = 1; error = 1;
} }
/* Check for potential overflow in PNG_ROWBYTES calculation */
if (error == 0 && width > (PNG_SIZE_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 */
- error) /* to prevent always-false compiler warning */
png_warning(png_ptr,
"Width may be too large for libpng to process pixels");
/* Check other values */ /* Check other values */
if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 && if (bit_depth != 1 && bit_depth != 2 && bit_depth != 4 &&
bit_depth != 8 && bit_depth != 16) bit_depth != 8 && bit_depth != 16)