[libpng17] Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngrutil.c.

Conditionally compile png_set_benign_errors() in pngtest.c
This commit is contained in:
Glenn Randers-Pehrson 2016-09-19 17:02:26 -05:00
parent 6f39846891
commit 28de8bf6cd
4 changed files with 16 additions and 12 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.7.0beta84 - September 12, 2016 Libpng 1.7.0beta84 - September 19, 2016
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.
@ -1396,12 +1396,13 @@ Version 1.7.0beta83 [July 23, 2016]
in reading. in reading.
Fixed debug test of output gamma. Fixed debug test of output gamma.
Version 1.7.0beta84 [September 12, 2016] Version 1.7.0beta84 [September 19, 2016]
Minor editing of INSTALL, (whitespace, added copyright line) Minor editing of INSTALL, (whitespace, added copyright line)
Don't install pngcp; it conflicts with pngcp in the pngtools package. Don't install pngcp; it conflicts with pngcp in the pngtools package.
Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo, Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo,
bugfix by John Bowler). bugfix by John Bowler).
Conditionally compile png_set_benign_errors() in pngread.c Conditionally compile png_set_benign_errors() in pngread.c and pngtest.c
Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngrutil.c.
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

@ -5696,12 +5696,13 @@ Version 1.7.0beta83 [July 23, 2016]
in reading. in reading.
Fixed debug test of output gamma. Fixed debug test of output gamma.
Version 1.7.0beta84 [September 12, 2016] Version 1.7.0beta84 [September 19, 2016]
Minor editing of INSTALL, (whitespace, added copyright line) Minor editing of INSTALL, (whitespace, added copyright line)
Don't install pngcp; it conflicts with pngcp in the pngtools package. Don't install pngcp; it conflicts with pngcp in the pngtools package.
Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo, Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo,
bugfix by John Bowler). bugfix by John Bowler).
Conditionally compile png_set_benign_errors() in pngread.c Conditionally compile png_set_benign_errors() in pngread.c and pngtest.c
Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngrutil.c.
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

@ -283,7 +283,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
*/ */
{ {
int ret; /* zlib return code */ int ret; /* zlib return code */
# if PNG_ZLIB_VERNUM >= 0x1240 # if ZLIB_VERNUM >= 0x1240
# if defined(PNG_SET_OPTION_SUPPORTED) && \ # if defined(PNG_SET_OPTION_SUPPORTED) && \
defined(PNG_MAXIMUM_INFLATE_WINDOW) defined(PNG_MAXIMUM_INFLATE_WINDOW)
@ -317,7 +317,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
*/ */
if (png_ptr->zstream.state != NULL) if (png_ptr->zstream.state != NULL)
{ {
# if PNG_ZLIB_VERNUM < 0x1240 # if ZLIB_VERNUM < 0x1240
ret = inflateReset(&png_ptr->zstream); ret = inflateReset(&png_ptr->zstream);
# else # else
ret = inflateReset2(&png_ptr->zstream, window_bits); ret = inflateReset2(&png_ptr->zstream, window_bits);
@ -326,7 +326,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
else else
{ {
# if PNG_ZLIB_VERNUM < 0x1240 # if ZLIB_VERNUM < 0x1240
ret = inflateInit(&png_ptr->zstream); ret = inflateInit(&png_ptr->zstream);
# else # else
ret = inflateInit2(&png_ptr->zstream, window_bits); ret = inflateInit2(&png_ptr->zstream, window_bits);

View File

@ -964,15 +964,16 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif #endif
#endif #endif
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
if (strict != 0) if (strict != 0)
{ {
/* Treat png_benign_error() as errors on read */ /* Treat png_benign_error() as errors on read */
png_set_benign_errors(read_ptr, 0); png_set_benign_errors(read_ptr, 0);
#ifdef PNG_WRITE_SUPPORTED # ifdef PNG_WRITE_SUPPORTED
/* Treat them as errors on write */ /* Treat them as errors on write */
png_set_benign_errors(write_ptr, 0); png_set_benign_errors(write_ptr, 0);
#endif # endif
/* if strict is not set, then app warnings and errors are treated as /* if strict is not set, then app warnings and errors are treated as
* warnings in release builds, but not in unstable builds; this can be * warnings in release builds, but not in unstable builds; this can be
@ -985,10 +986,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
/* Allow application (pngtest) errors and warnings to pass */ /* Allow application (pngtest) errors and warnings to pass */
png_set_benign_errors(read_ptr, 1); png_set_benign_errors(read_ptr, 1);
#ifdef PNG_WRITE_SUPPORTED # ifdef PNG_WRITE_SUPPORTED
png_set_benign_errors(write_ptr, 1); png_set_benign_errors(write_ptr, 1);
#endif # endif
} }
#endif /* BENIGN_ERRORS */
pngtest_debug("Initializing input and output streams"); pngtest_debug("Initializing input and output streams");
#ifdef PNG_STDIO_SUPPORTED #ifdef PNG_STDIO_SUPPORTED