From 5230d90184c1597f55558c1f3a420d4e871095e7 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 1 Mar 2018 07:41:01 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6628 --- coders/miff.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/coders/miff.c b/coders/miff.c index 456bdb7e4..c79e2b657 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -1180,6 +1180,8 @@ static Image *ReadMIFFImage(const ImageInfo *image_info, Create image colormap. */ packet_size=(size_t) (3UL*image->depth/8UL); + if ((MagickSizeType) colors > GetBlobSize(image)) + ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); if (((MagickSizeType) packet_size*colors) > GetBlobSize(image)) ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); status=AcquireImageColormap(image,colors != 0 ? colors : 256,exception); -- 2.40.0