]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6241
authorCristy <urban-warrior@imagemagick.org>
Mon, 12 Feb 2018 13:13:58 +0000 (08:13 -0500)
committerCristy <urban-warrior@imagemagick.org>
Mon, 12 Feb 2018 13:13:58 +0000 (08:13 -0500)
coders/pcx.c

index 4b526905c1bba5bea34127945a1616297916d74c..84746693d2a4cbf51d9640661c74075369dccdf6 100644 (file)
@@ -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)));
     /*