From 7835716cef5b69dc5b7939837b1a4a10f838a709 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 19 Sep 2016 16:46:54 -0500 Subject: [PATCH] [libpng16] Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngpriv.h, pngstruct.h, and pngrutil.c. --- ANNOUNCE | 6 ++++-- CHANGES | 4 +++- pngpriv.h | 2 +- pngrutil.c | 10 +++++----- pngstruct.h | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index d3fd78005..559a2235a 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.26beta01 - September 12, 2016 +Libpng 1.6.26beta01 - September 19, 2016 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. @@ -25,7 +25,7 @@ Other information: Changes since the last public release (1.6.25): -Version 1.6.26beta01 [September 12, 2016] +Version 1.6.26beta01 [September 19, 2016] Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo, bugfix by John Bowler). Do not issue a png_error() on read in png_set_pCAL() because png_handle_pCAL @@ -33,6 +33,8 @@ Version 1.6.26beta01 [September 12, 2016] Conditionally compile png_set_benign_errors() in pngread.c and pngtest.c Issue a png_benign_error instead of a png_error on ADLER32 mismatch while decoding compressed data chunks. + Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngpriv.h, pngstruct.h, and + pngrutil.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 2b318c790..ff7143a6d 100644 --- a/CHANGES +++ b/CHANGES @@ -5703,7 +5703,7 @@ Version 1.6.25rc05 [August 30, 2016] Version 1.6.25 [September 1, 2016] No changes. -Version 1.6.26beta01 [September 12, 2016] +Version 1.6.26beta01 [September 19, 2016] Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo, bugfix by John Bowler). Do not issue a png_error() on read in png_set_pCAL() because png_handle_pCAL @@ -5711,6 +5711,8 @@ Version 1.6.26beta01 [September 12, 2016] Conditionally compile png_set_benign_errors() in pngread.c and pngtest.c Issue a png_benign_error instead of a png_error on ADLER32 mismatch while decoding compressed data chunks. + Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngpriv.h, pngstruct.h, and + pngrutil.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngpriv.h b/pngpriv.h index bed1cabe7..a71ea1610 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -1263,7 +1263,7 @@ PNG_INTERNAL_FUNCTION(void,png_read_finish_row,(png_structrp png_ptr), /* Initialize the row buffers, etc. */ PNG_INTERNAL_FUNCTION(void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY); -#if PNG_ZLIB_VERNUM >= 0x1240 +#if ZLIB_VERNUM >= 0x1240 PNG_INTERNAL_FUNCTION(int,png_zlib_inflate,(png_structrp png_ptr, int flush), PNG_EMPTY); # define PNG_INFLATE(pp, flush) png_zlib_inflate(pp, flush) diff --git a/pngrutil.c b/pngrutil.c index c619cbb5e..26a8ebc99 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -370,7 +370,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) */ { int ret; /* zlib return code */ -#if PNG_ZLIB_VERNUM >= 0x1240 +#if ZLIB_VERNUM >= 0x1240 # if defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_MAXIMUM_INFLATE_WINDOW) int window_bits; @@ -402,7 +402,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0) { -#if PNG_ZLIB_VERNUM < 0x1240 +#if ZLIB_VERNUM < 0x1240 ret = inflateReset(&png_ptr->zstream); #else ret = inflateReset2(&png_ptr->zstream, window_bits); @@ -411,7 +411,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) else { -#if PNG_ZLIB_VERNUM < 0x1240 +#if ZLIB_VERNUM < 0x1240 ret = inflateInit(&png_ptr->zstream); #else ret = inflateInit2(&png_ptr->zstream, window_bits); @@ -435,7 +435,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) #endif } -#if PNG_ZLIB_VERNUM >= 0x1240 +#if ZLIB_VERNUM >= 0x1240 /* Handle the start of the inflate stream if we called inflateInit2(strm,0); * in this case some zlib versions skip validation of the CINFO field and, in * certain circumstances, libpng may end up displaying an invalid image, in @@ -4103,7 +4103,7 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output, if (output != NULL) { if(!strncmp(png_ptr->zstream.msg,"incorrect data check",20)) - png_chunk_benign_error(png_ptr, png_ptr->zstream.msg); + png_chunk_benign_error(png_ptr, "ADLER32 checksum mismatch"); else png_chunk_error(png_ptr, png_ptr->zstream.msg); } diff --git a/pngstruct.h b/pngstruct.h index 2b0eb4902..55516eaaa 100644 --- a/pngstruct.h +++ b/pngstruct.h @@ -263,7 +263,7 @@ struct png_struct_def /* pixel depth used for the row buffers */ png_byte transformed_pixel_depth; /* pixel depth after read/write transforms */ -#if PNG_ZLIB_VERNUM >= 0x1240 +#if ZLIB_VERNUM >= 0x1240 png_byte zstream_start; /* at start of an input zlib stream */ #endif /* Zlib >= 1.2.4 */ #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)