diff --git a/ANNOUNCE b/ANNOUNCE index 5458d645152aac93a4ccf999882a74097015c5cf..c3e6de2bc5c4c28b9a21ee673e5c0fc75fbc4c1e 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -26,6 +26,8 @@ Other information: Changes since the last public release (1.6.26): Version 1.6.27beta01 [October 28, 2016] + Restrict the new ADLER32-skipping to IDAT chunks. It broke iCCP chunk + handling. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 46c3a42ea42eeca5b758aaf26fa71ce729da5856..b6dae0fc53320b3ea4258e095ad618e95b68e5d3 100644 --- a/CHANGES +++ b/CHANGES @@ -5755,6 +5755,8 @@ Version 1.6.26 [October 20, 2016] Despammed email addresses (replaced "@" with " at "). Version 1.6.27beta01 [October 28, 2016] + Restrict the new ADLER32-skipping to IDAT chunks. It broke iCCP chunk + handling. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngrutil.c b/pngrutil.c index d34e288547f9930e335e450f28f019804f1f31ea..c492020510b173a9941f14c9fc40e7d661e481ee 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.6.26 [October 20, 2016] + * Last changed in libpng 1.6.27 [(PENDING RELEASE)] * Copyright (c) 1998-2002,2004,2006-2016 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.) @@ -420,7 +420,8 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner) #if ZLIB_VERNUM >= 0x1281 /* Turn off validation of the ADLER32 checksum in IDAT chunks */ - if ((png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) != 0) + if ((png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) != 0 && + png_ptr->zowner == png_IDAT) ret = inflateValidate(&png_ptr->zstream, 0); #endif