From: Cristy Date: Sat, 9 Feb 2019 23:05:18 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.8-28~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76965d12e18279d44c8eb0eb416c260906132994;p=imagemagick ... --- diff --git a/coders/wpg.c b/coders/wpg.c index 895f1d82c..f2c024afb 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -1159,7 +1159,7 @@ static Image *ReadWPGImage(const ImageInfo *image_info, if (WPG_Palette.StartIndex > WPG_Palette.NumOfEntries) ThrowReaderException(CorruptImageError,"InvalidColormapIndex"); image->colors=WPG_Palette.NumOfEntries; - if (!AcquireImageColormap(image,image->colors,exception)) + if (AcquireImageColormap(image,image->colors,exception) == MagickFalse) goto NoMemory; for (i=WPG_Palette.StartIndex; i < (int)WPG_Palette.NumOfEntries; i++) @@ -1245,9 +1245,8 @@ static Image *ReadWPGImage(const ImageInfo *image_info, { if (bpp < 24) if ( (image->colors < (one << bpp)) && (bpp != 24) ) - image->colormap=(PixelInfo *) ResizeQuantumMemory( - image->colormap,(size_t) (one << bpp), - sizeof(*image->colormap)); + if (AcquireImageColormap(image,one << bpp,exception) == MagickFalse) + goto NoMemory; } if ((bpp == 1) && (image->colors > 1)) diff --git a/configure b/configure index 54edee2d7..0f937c792 100755 --- a/configure +++ b/configure @@ -4570,7 +4570,7 @@ MAGICK_PATCHLEVEL_VERSION=28 MAGICK_VERSION=7.0.8-28 -MAGICK_GIT_REVISION=15314:4bffda6:20190209 +MAGICK_GIT_REVISION=15319:51dd231d7:20190209 # Substitute library versioning