File ImageMagick-CVE-2018-17966.patch of Package ImageMagick.30356
Index: ImageMagick-7.0.7-34/coders/pdb.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/pdb.c 2018-05-20 17:55:43.000000000 +0200
+++ ImageMagick-7.0.7-34/coders/pdb.c 2018-10-10 08:17:17.835915828 +0200
@@ -885,6 +885,8 @@ static MagickBooleanType WritePDBImage(c
if (quantum_info == (QuantumInfo *) NULL)
{
runlength=(unsigned char *) RelinquishMagickMemory(runlength);
+ buffer=(unsigned char *) RelinquishMagickMemory(buffer);
+ scanline=(unsigned char *) RelinquishMagickMemory(scanline);
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
}
status=SetQuantumDepth(image,quantum_info,image->depth > 8 ? 16 : 8);