From: Cristy Date: Fri, 16 Mar 2018 22:56:37 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6915 X-Git-Tag: 7.0.7-27~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=771e54d106ce5ff043e7812b4182f3c08a748001;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6915 --- diff --git a/coders/pdb.c b/coders/pdb.c index 0e99876d3..52ba27997 100644 --- a/coders/pdb.c +++ b/coders/pdb.c @@ -424,7 +424,7 @@ static Image *ReadPDBImage(const ImageInfo *image_info,ExceptionInfo *exception) if (pixels == (unsigned char *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); (void) memset(pixels,0,(packets+257UL)*image->rows*sizeof(*pixels)); - switch (pdb_image.version & 0x07) + switch (pdb_image.version & 0x07) { case 0: { @@ -860,6 +860,7 @@ static MagickBooleanType WritePDBImage(const ImageInfo *image_info,Image *image, scanline=(unsigned char *) RelinquishMagickMemory(scanline); ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); } + (void) ResetMagickMemory(buffer,0,512*sizeof(*buffer)); if (IssRGBCompatibleColorspace(image->colorspace) == MagickFalse) (void) TransformImageColorspace(image,sRGBColorspace,exception); /*