[libpng16] Added code to validate the windowBits value passed to deflateInit2().

If the call to deflateInit2() is wrong a png_warning will be issued
(in fact this is harmless, but the PNG data produced may be sub-optimal).
This commit is contained in:
John Bowler
2012-03-05 21:26:57 -06:00
committed by Glenn Randers-Pehrson
parent d072048925
commit 6225b0e61e
5 changed files with 39 additions and 21 deletions

View File

@@ -65,9 +65,9 @@ struct png_struct_def
png_uint_32 flags; /* flags indicating various things to libpng */
png_uint_32 transformations; /* which transformations to perform */
z_stream zstream; /* pointer to decompression structure (below) */
z_stream zstream; /* decompression structure */
png_bytep zbuf; /* buffer for zlib */
uInt zbuf_size; /* size of zbuf (typically 65536) */
uInt zbuf_size; /* size of zbuf */
#ifdef PNG_WRITE_SUPPORTED
int zlib_level; /* holds zlib compression level */