]> granicus.if.org Git - imagemagick/commitdiff
Reset buffer to avoid use of uninitialized value (https://bugs.chromium.org/p/oss...
authorDirk Lemstra <dirk@git.imagemagick.org>
Sun, 4 Mar 2018 15:54:57 +0000 (16:54 +0100)
committerDirk Lemstra <dirk@git.imagemagick.org>
Sun, 4 Mar 2018 15:56:57 +0000 (16:56 +0100)
coders/wpg.c

index f560cd02e8c23e540101349a3bf68c5686c7f081..f0cfdc9d3c08c53b15d301d3abaffb3a211a290f 100644 (file)
@@ -446,6 +446,7 @@ static int UnpackWPGRaster(Image *image,int bpp,ExceptionInfo *exception)
   BImgBuff=(unsigned char *) AcquireQuantumMemory((size_t) ldblk,
     8*sizeof(*BImgBuff));
   if(BImgBuff==NULL) return(-2);
+  (void) ResetMagickMemory(BImgBuff,0,(size_t) ldblk*8*sizeof(*BImgBuff));
 
   while(y<(ssize_t) image->rows)
     {