From 8ff2ed2fe1b52e0da579057949a7fbed0b6604fe Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Thu, 11 Aug 2016 20:13:33 -0500 Subject: [PATCH] [libng16] Conditionally compile png_inflate(). It's not needed for iCCP chunk reading. --- ANNOUNCE | 5 +++-- CHANGES | 3 ++- pngrutil.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ANNOUNCE b/ANNOUNCE index 59686fd91..64abcb298 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.25beta01 - August 11, 2016 +Libpng 1.6.25beta01 - August 12, 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,9 +25,10 @@ Other information: Changes since the last public release (1.6.24): -Version 1.6.25beta01 [August 11, 2016] +Version 1.6.25beta01 [August 12, 2016] Reject oversized iCCP profile immediately. Cleaned up PNG_DEBUG compile of pngtest.c. + Conditionally compile png_inflate(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index a91f38418..62619837b 100644 --- a/CHANGES +++ b/CHANGES @@ -5675,9 +5675,10 @@ Version 1.6.24rc03 [August 2, 2016] Version 1.6.24[August 4, 2016] No changes. -Version 1.6.25beta01 [August 11, 2016] +Version 1.6.25beta01 [August 12, 2016] Reject oversized iCCP profile immediately. Cleaned up PNG_DEBUG compile of pngtest.c. + Conditionally compile png_inflate(). Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngrutil.c b/pngrutil.c index 7efefe2c8..a92b14227 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -461,6 +461,7 @@ png_zlib_inflate(png_structrp png_ptr, int flush) #endif /* Zlib >= 1.2.4 */ #ifdef PNG_READ_COMPRESSED_TEXT_SUPPORTED +#if defined(PNG_READ_zTXt_SUPPORTED) || defined (PNG_READ_iTXt_SUPPORTED) /* png_inflate now returns zlib error codes including Z_OK and Z_STREAM_END to * allow the caller to do multiple calls if required. If the 'finish' flag is * set Z_FINISH will be passed to the final inflate() call and Z_STREAM_END must @@ -590,7 +591,6 @@ png_inflate(png_structrp png_ptr, png_uint_32 owner, int finish, } } -#if defined(PNG_READ_zTXt_SUPPORTED) || defined (PNG_READ_iTXt_SUPPORTED) /* * Decompress trailing data in a chunk. The assumption is that read_buffer * points at an allocated area holding the contents of a chunk with a -- GitLab