From 8f3f88e52f84f7dcca902a8a56b3f3e841c86e68 Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 21 Feb 2017 15:26:00 -0500 Subject: [PATCH] ... --- coders/mpc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coders/mpc.c b/coders/mpc.c index 83ca2016e..3a85d5597 100644 --- a/coders/mpc.c +++ b/coders/mpc.c @@ -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) { -- 2.40.0