From 9e80713e5132a3bd26702ee0a833306f7e801469 Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 23 Feb 2018 05:15:02 -0500 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/998 --- coders/webp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/webp.c b/coders/webp.c index 17e071b12..fffccd77e 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -187,7 +187,7 @@ static MagickBooleanType IsWEBPImageLossless(const unsigned char *stream, Read extended header. */ offset=RIFF_HEADER_SIZE+TAG_SIZE+CHUNK_SIZE_BYTES+VP8X_CHUNK_SIZE; - while (offset <= (ssize_t) length) + while (offset <= (ssize_t) (length-TAG_SIZE)) { uint32_t chunk_size, -- 2.40.0