]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/491
authorCristy <urban-warrior@imagemagick.org>
Mon, 15 May 2017 23:06:39 +0000 (19:06 -0400)
committerCristy <urban-warrior@imagemagick.org>
Mon, 15 May 2017 23:10:33 +0000 (19:10 -0400)
MagickCore/image.c

index ce60390fb019d320d06b8c6468ba6c4e7ad8d3fa..c2e666f51f47245bcf872bc04a253fa5e61a9a80 100644 (file)
@@ -849,7 +849,7 @@ MagickExport Image *CloneImage(const Image *image,const size_t columns,
       */
       clone_image->colors=image->colors;
       length=(size_t) image->colors;
-      clone_image->colormap=(PixelInfo *) AcquireQuantumMemory(length,
+      clone_image->colormap=(PixelInfo *) AcquireQuantumMemory(length+1,
         sizeof(*clone_image->colormap));
       if (clone_image->colormap == (PixelInfo *) NULL)
         {