From: Cristy Date: Mon, 15 May 2017 23:06:39 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/491 X-Git-Tag: 7.0.5-7~9 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e05780990eecbe1b5f2884ad30e04328cec646bf;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/491 --- diff --git a/MagickCore/image.c b/MagickCore/image.c index ce60390fb..c2e666f51 100644 --- a/MagickCore/image.c +++ b/MagickCore/image.c @@ -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) {