[libpng14] Removed a redundant test from png_set_IHDR().

This commit is contained in:
Glenn Randers-Pehrson 2013-06-04 15:01:38 -05:00
parent 07f9f0b469
commit 648f543b0c
3 changed files with 7 additions and 14 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.4.13beta03 - March 1, 2013
Libpng 1.4.13beta03 - June 4, 2013
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.
@ -42,8 +42,9 @@ version 1.4.13beta02 [January 22, 2013]
in configure.ac
Changed default value of PNG_USER_CACHE_MAX from 0 to 32767 in pngconf.h.
version 1.4.13beta03 [March 1, 2013]
version 1.4.13beta03 [June 4, 2013]
Avoid a possible memory leak in contrib/gregbook/readpng.c
Removed a redundant test from png_set_IHDR().
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -2884,8 +2884,9 @@ version 1.4.13beta02 [January 22, 2013]
in configure.ac
Changed default value of PNG_USER_CACHE_MAX from 0 to 32767 in pngconf.h.
version 1.4.13beta03 [March 1, 2013]
version 1.4.13beta03 [June 4, 2013]
Avoid a possible memory leak in contrib/gregbook/readpng.c
Removed a redundant test from png_set_IHDR().
Send comments/corrections/commendations to glennrp at users.sourceforge.net
or to png-mng-implement at lists.sf.net (subscription required; visit

View File

@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.4.13 [January 22, 2013]
* Last changed in libpng 1.4.13 [June 4, 2013]
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -250,16 +250,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
info_ptr->channels++;
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
/* Check for potential overflow */
if (width > (PNG_UINT_32_MAX
>> 3) /* 8-byte RGBA pixels */
- 64 /* 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);
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
}
#ifdef PNG_oFFs_SUPPORTED