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

This commit is contained in:
Glenn Randers-Pehrson 2013-06-04 14:57:55 -05:00
parent 0801f13173
commit de089548e0
3 changed files with 7 additions and 57 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.17beta01 - May 23, 2013 Libpng 1.5.17beta01 - 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.
@ -24,52 +24,10 @@ Other information:
1.5.17beta01-README.txt 1.5.17beta01-README.txt
1.5.17beta01-LICENSE.txt 1.5.17beta01-LICENSE.txt
Changes since the last public release (1.5.15): Changes since the last public release (1.5.16):
Version 1.5.16beta01 [April 25, 2013] Version 1.5.17beta01 [June 4, 2013]
Corrected a misplaced closing bracket in contrib/libtests/pngvalid.c Removed a redundant test from png_set_IHDR().
(Flavio Medeiros).
Revised stack marking in arm/filter_neon.S and configure.ac
Ensure that NEON filter stuff is completely disabled when switched 'off'.
Previously the ARM NEON specific files were still built if the option
was switched 'off' as opposed to being explicitly disabled.
Avoid a compiler warning about unused png_ptr in translate_gamma_flags()
Version 1.5.16beta02 [April 26, 2013]
Revise pngtest.c to skip tests of unsupported features.
Regenerated configure files.
Version 1.5.16beta03 [April 26, 2013]
Test for 'arm*' not just 'arm' in the host_cpu configure variable.
Version 1.5.16beta04 [May 1, 2013]
Expanded manual paragraph about writing private chunks, particularly
the need to call png_set_keep_unknown_chunks() when writing them.
Version 1.5.16beta05 [May 9, 2013]
Updated contrib/pngminus/pnm2png.c (Paul Stewart):
Check for EOF
Ignore "#" delimited comments in input file to pnm2png.c.
Fixed whitespace handling
Added a call to png_set_packing()
Initialize dimension values so if sscanf fails at least we have known
invalid values.
Version 1.5.16beta06 [May 12, 2013]
Allow contrib/pnminus/pnm2png.c to compile without WRITE_INVERT and WRITE_PACK
supported (writes error message that it can't read P1 or P4 PBM files).
Revised contrib/pngminim/*/makefile to separate CPPFLAGS and CFLAGS, and
to generate pnglibconf.h with the right zlib header files.
Ported contrib/pngminus/pnm2png.c changes back from libpng-1.6.3beta06,
to use unsigned long, not png_uint_32 arguments to sscanf().
Version 1.5.16rc01 [May 16, 2013]
No changes.
Version 1.5.16 [May 23, 2013]
No changes.
Version 1.5.17beta01 [May 23, 2013]
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

@ -4113,7 +4113,8 @@ Version 1.5.16rc01 [May 16, 2013]
Version 1.5.16 [May 23, 2013] Version 1.5.16 [May 23, 2013]
No changes. No changes.
Version 1.5.17beta01 [May 23, 2013] Version 1.5.17beta01 [June 4, 2013]
Removed a redundant test from 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

@ -252,16 +252,7 @@ png_set_IHDR(png_structp png_ptr, png_infop 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