]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Thu, 6 Jul 2017 12:53:47 +0000 (08:53 -0400)
committerCristy <urban-warrior@imagemagick.org>
Thu, 6 Jul 2017 12:53:47 +0000 (08:53 -0400)
coders/mpc.c

index 5c9e5ba5cfd9e819111331eab4a8cdfe499d53c7..b4fabc019595aaa900db41131858f16502946490 100644 (file)
@@ -860,7 +860,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
           Create image colormap.
         */
         packet_size=(size_t) (3UL*depth/8UL);
-        if ((packet_size*colors) > GetBlobSize(image))
+        if ((packet_size*image->colors) > GetBlobSize(image))
           ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
         image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors+1,
           sizeof(*image->colormap));