]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Tue, 21 Feb 2017 20:26:00 +0000 (15:26 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 21 Feb 2017 20:26:00 +0000 (15:26 -0500)
coders/mpc.c

index 83ca2016e51ced16b0fa3f856aee0e5e03b69c4d..3a85d5597fee827c9740a7737b74f5c2550e5d4f 100644 (file)
@@ -850,7 +850,9 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
         /*
           Create image colormap.
         */
-        if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
+        image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors+1,
+          sizeof(*image->colormap));
+        if (image->colormap == (PixelInfo *) NULL)
           ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
         if (image->colors != 0)
           {