]> granicus.if.org Git - imagemagick/commitdiff
Wrong variable, use colors not image->colors
authorCristy <urban-warrior@imagemagick.org>
Thu, 6 Jul 2017 12:51:41 +0000 (08:51 -0400)
committerCristy <urban-warrior@imagemagick.org>
Thu, 6 Jul 2017 12:51:41 +0000 (08:51 -0400)
coders/miff.c
coders/mpc.c

index 30f184d3473300b9ff07c51bad64a12a2745310a..8b2e2e3216ed9dd6e25ceef968f78d1df2c437f3 100644 (file)
@@ -1165,7 +1165,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
           Create image colormap.
         */
         packet_size=(size_t) (3UL*image->depth/8UL);
-        if ((packet_size*image->colors) > GetBlobSize(image))
+        if ((packet_size*colors) > GetBlobSize(image))
           ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
         status=AcquireImageColormap(image,colors != 0 ? colors : 256,exception);
         if (status == MagickFalse)
index b4fabc019595aaa900db41131858f16502946490..5c9e5ba5cfd9e819111331eab4a8cdfe499d53c7 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*image->colors) > GetBlobSize(image))
+        if ((packet_size*colors) > GetBlobSize(image))
           ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
         image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors+1,
           sizeof(*image->colormap));