[libpng17] Removed a redundant test in png_set_IHDR().

This commit is contained in:
Glenn Randers-Pehrson
2013-06-04 15:09:06 -05:00
parent 3c051ee282
commit 4c9168875b
3 changed files with 6 additions and 13 deletions

View File

@@ -1,5 +1,5 @@
Libpng 1.7.0beta14 - May 13, 2013 Libpng 1.7.0beta14 - June 4, 2013
This is not intended to be a public release. It will be replaced This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version. within a few weeks by a public version or by another test version.
@@ -304,7 +304,8 @@ Version 1.7.0beta13 [May 12, 2013]
Added information in the documentation about problems with and fixes for Added information in the documentation about problems with and fixes for
the bad CRC and bad iTXt chunk situations. the bad CRC and bad iTXt chunk situations.
Version 1.7.0beta14 [May 13, 2013] Version 1.7.0beta14 [June 4, 2013]
Removed a redundant test in png_set_IHDR().
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

@@ -4592,7 +4592,8 @@ Version 1.7.0beta13 [May 12, 2013]
Added information in the documentation about problems with and fixes for Added information in the documentation about problems with and fixes for
the bad CRC and bad iTXt chunk situations. the bad CRC and bad iTXt chunk situations.
Version 1.7.0beta14 [May 13, 2013] Version 1.7.0beta14 [June 4, 2013]
Removed a redundant test in png_set_IHDR().
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

@@ -238,16 +238,7 @@ png_set_IHDR(png_const_structrp png_ptr, png_inforp info_ptr,
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth); info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
/* Check for potential overflow */ info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
if (width >
(PNG_UINT_32_MAX >> 3) /* 8-byte RRGGBBAA pixels */
- 48 /* bigrowbuf hack */
- 1 /* filter byte */
- 7*8 /* rounding of width to multiple of 8 pixels */
- 8) /* extra max_pixel_depth pad */
info_ptr->rowbytes = 0;
else
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
} }
#ifdef PNG_oFFs_SUPPORTED #ifdef PNG_oFFs_SUPPORTED