From: Cristy Date: Mon, 12 Feb 2018 13:13:58 +0000 (-0500) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6241 X-Git-Tag: 7.0.7-23~50 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fda26c312b8d99e0cfaa82233741946c1206de81;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6241 --- diff --git a/coders/pcx.c b/coders/pcx.c index 4b526905c..84746693d 100644 --- a/coders/pcx.c +++ b/coders/pcx.c @@ -418,6 +418,8 @@ static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception) pixel_info=RelinquishVirtualMemory(pixel_info); ThrowPCXException(ResourceLimitError,"MemoryAllocationFailed"); } + (void) ResetMagickMemory(scanline,0,(size_t) MagickMax(image->columns, + pcx_info.bytes_per_line)*MagickMax(8,pcx_info.planes)*sizeof(*scanline)); pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info); (void) ResetMagickMemory(pixels,0,(size_t) pcx_packets*(2*sizeof(*pixels))); /*