]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6687
authorCristy <urban-warrior@imagemagick.org>
Sat, 3 Mar 2018 14:51:00 +0000 (09:51 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 3 Mar 2018 14:51:00 +0000 (09:51 -0500)
coders/viff.c

index 93854fad7335e1834e6b379314da270fb20e54fe..1666df069f914b673c85803134e85898bee14db0 100644 (file)
@@ -519,6 +519,8 @@ static Image *ReadVIFFImage(const ImageInfo *image_info,
       number_pixels,max_packets),bytes_per_pixel*sizeof(*pixels));
     if (pixels == (unsigned char *) NULL)
       ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+    (void) ResetMagickMemory(pixels,0,MagickMax(number_pixels,max_packets)*
+      bytes_per_pixel*sizeof(*pixels));
     count=ReadBlob(image,bytes_per_pixel*max_packets,pixels);
     lsb_first=1;
     if (*(char *) &lsb_first &&