mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Use zlib-1.2.8.1 inflateValidate() instead of inflateReset2() to
avoid ADLER32 evaluation.
This commit is contained in:
@@ -418,10 +418,10 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
|
||||
png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED;
|
||||
}
|
||||
|
||||
#if ZLIB_VERNUM >= 0x1240
|
||||
#if ZLIB_VERNUM >= 0x1281
|
||||
/* Turn off validation of the ADLER32 checksum */
|
||||
if ((png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) != 0)
|
||||
ret = inflateReset2(&png_ptr->zstream, -window_bits);
|
||||
ret = inflateValidate(&png_ptr->zstream, 0);
|
||||
#endif
|
||||
|
||||
if (ret == Z_OK)
|
||||
|
||||
Reference in New Issue
Block a user