From: Dirk Lemstra Date: Sun, 4 Mar 2018 15:54:57 +0000 (+0100) Subject: Reset buffer to avoid use of uninitialized value (https://bugs.chromium.org/p/oss... X-Git-Tag: 7.0.7-26~97 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce433f8048b120b2a0413b4ac3ef59fca35a9788;p=imagemagick Reset buffer to avoid use of uninitialized value (https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=5710). --- diff --git a/coders/wpg.c b/coders/wpg.c index f560cd02e..f0cfdc9d3 100644 --- a/coders/wpg.c +++ b/coders/wpg.c @@ -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) {