We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 27884be commit 3e673e9Copy full SHA for 3e673e9
spng/spng.c
@@ -369,7 +369,9 @@ static int spng__inflate_init(spng_ctx *ctx)
369
if(inflateInit(&ctx->zstream) != Z_OK) return SPNG_EZLIB;
370
371
#if ZLIB_VERNUM >= 0x1290 && !defined(SPNG_USE_MINIZ)
372
- if(inflateValidate(&ctx->zstream, ctx->flags & SPNG_CTX_IGNORE_ADLER32)) return SPNG_EZLIB;
+ int validate = 1;
373
+ if(ctx->flags & SPNG_CTX_IGNORE_ADLER32) validate = 0;
374
+ if(inflateValidate(&ctx->zstream, validate)) return SPNG_EZLIB;
375
#else /* This requires zlib >= 1.2.11 */
376
#pragma message ("inflateValidate() not available, SPNG_CTX_IGNORE_ADLER32 will be ignored")
377
#endif
0 commit comments