diff options
author | John Bowler <jbowler@acm.org> | 2015-11-27 23:57:39 -0800 |
---|---|---|
committer | John Bowler <jbowler@acm.org> | 2015-11-27 23:57:39 -0800 |
commit | 28a1cdfc2ed07d7c1af803dd98a50550699c847c (patch) | |
tree | ab5c1d3ac9a122c5ab863cfd9b804f415818472c /pngstruct.h | |
parent | 87049cbf84d33fe0495b9dd8c61c4917067449b6 (diff) | |
download | libpng-28a1cdfc2ed07d7c1af803dd98a50550699c847c.tar.gz |
Fix inconsistent handling of invalid zlib data
In libpng 1.6 zlib initialization was changed to use the window size in the zlib
stream, not a fixed value. This causes some invalid images, ones where CINFO is
too large, to display 'correctly' if the rest of the data is valid. This
provides a work-round for zlib versions where the error arises (ones that
support the API change to use the window size in the stream).
Signed-off-by: John Bowler <jbowler@acm.org>
Diffstat (limited to 'pngstruct.h')
-rw-r--r-- | pngstruct.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pngstruct.h b/pngstruct.h index c8c0e46e8..d0bcc7914 100644 --- a/pngstruct.h +++ b/pngstruct.h @@ -263,6 +263,9 @@ struct png_struct_def /* pixel depth used for the row buffers */ png_byte transformed_pixel_depth; /* pixel depth after read/write transforms */ +#if PNG_ZLIB_VERNUM >= 0x1240 + png_byte zstream_start; /* at start of an input zlib stream */ +#endif /* Zlib >= 1.2.4 */ #if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED) png_uint_16 filler; /* filler bytes for pixel expansion */ #endif |