don't check ADLER32 checksums on libpng load

can be rather chatty, and even cause loops on some libpng versions

see https://github.com/libvips/libvips/discussions/2930
This commit is contained in:
John Cupitt 2022-07-16 17:18:39 +01:00
parent d546c81fa3
commit 57fff0fe2b

View File

@ -301,6 +301,13 @@ read_new( VipsSource *source, VipsImage *out,
PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON );
#endif /*PNG_SKIP_sRGB_CHECK_PROFILE*/
/* Don't verify ADLER32 checksums (this can produce a lot of
* warnings).
*/
#ifdef PNG_IGNORE_ADLER32
png_set_option( read->pPng, PNG_IGNORE_ADLER32, PNG_OPTION_ON );
#endif /*PNG_IGNORE_ADLER32*/
/* Disable CRC checking in fuzzing mode. Most fuzzed images will have
* bad CRCs so this check would break fuzzing.
*/