From fda26c312b8d99e0cfaa82233741946c1206de81 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 12 Feb 2018 08:13:58 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6241 --- coders/pcx.c | 2 ++ 1 file changed, 2 insertions(+) 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))); /* -- 2.40.0