[devel] Reset zlib datastream after detecting oversized compressed chunk
This commit is contained in:
parent
9b0956fed1
commit
4748a3346e
@ -248,9 +248,13 @@ png_measure_decompressed_chunk(png_structp png_ptr, int comp_type,
|
|||||||
if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
|
if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
|
||||||
text_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
|
text_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
inflateReset(&png_ptr->zstream);
|
||||||
|
png_ptr->zstream.avail_in = 0;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (ret == Z_STREAM_END)
|
if (ret == Z_STREAM_END)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user