From: Cristy Date: Sun, 24 Feb 2019 18:44:01 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.8-29~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=257e255be68c172eb786b907365278c4661e8474;p=imagemagick ... --- diff --git a/coders/wpg.c b/coders/wpg.c index 756c41c26..6994ca0c5 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -1262,8 +1262,8 @@ static Image *ReadWPGImage(const ImageInfo *image_info, RelinquishMagickMemory(colormap); goto NoMemory; } - (void) memcpy(image->colormap,colormap,colors* - sizeof(*image->colormap)); + (void) memcpy(image->colormap,colormap,MagickMin( + image->colors,colors)*sizeof(*image->colormap)); colormap=(PixelInfo *) RelinquishMagickMemory(colormap); }