summaryrefslogtreecommitdiff
path: root/pngrutil.c
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-08-06 07:59:02 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2017-08-06 07:59:02 -0500
commit8ed418b042ac58fdd8da2818917cd2f478cbe466 (patch)
tree2b5042e205b80fc34a1600d502b6c261dffd8c4f /pngrutil.c
parent39d84f4f6abd8b4f537e4e06d67b3b1907116bec (diff)
[libpng16] Increase minimum zlib stream from 9 to 14 in png_handle_iCCP(),
to account for the minimum 'deflate' stream.
Diffstat (limited to 'pngrutil.c')
-rw-r--r--pngrutil.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/pngrutil.c b/pngrutil.c
index 6c6a39a35..8656fa5b5 100644
--- a/pngrutil.c
+++ b/pngrutil.c
@@ -1380,11 +1380,12 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
* chunk is just ignored, so does not invalidate the color space. An
* alternative is to set the 'invalid' flags at the start of this routine
* and only clear them in they were not set before and all the tests pass.
- * The minimum 'deflate' stream is assumed to be just the 2 byte header and
- * 4 byte checksum. The keyword must be at least one character and there is
- * a terminator (0) byte and the compression method.
+ * The minimum 'zlib' stream is assumed to be just the 2 byte header,
+ * 5 bytes minimum 'deflate' stream, and the 4 byte checksum. The keyword
+ * must be at least one character and there is a terminator (0) byte and
+ * the compression method.
*/
- if (length < 9)
+ if (length < 14)
{
png_crc_finish(png_ptr, length);
png_chunk_benign_error(png_ptr, "too short");