]> granicus.if.org Git - imagemagick/commitdiff
Zero pixel buffer
authorCristy <urban-warrior@imagemagick.org>
Sun, 9 Jul 2017 13:06:00 +0000 (09:06 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sun, 9 Jul 2017 13:06:00 +0000 (09:06 -0400)
coders/jpeg.c

index 2d1be58a9231b8e56d185f8c4cc68854b820e1ed..c3a813a6e593f8d3f0e9cbeda398089a388369c2 100644 (file)
@@ -1318,6 +1318,8 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
       ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
     }
   jpeg_pixels=(JSAMPLE *) GetVirtualMemoryBlob(memory_info);
+  (void) ResetMagickMemory(jpeg_pixels,0,image->columns*
+    jpeg_info.output_components*sizeof(*jpeg_pixels));
   /*
     Convert JPEG pixels to pixel packets.
   */