File ImageMagick-CVE-2016-7531.patch of Package ImageMagick
Index: ImageMagick-6.8.9-8/coders/pdb.c
===================================================================
--- ImageMagick-6.8.9-8.orig/coders/pdb.c 2016-10-07 10:44:36.317064128 +0200
+++ ImageMagick-6.8.9-8/coders/pdb.c 2016-10-07 10:45:44.822132030 +0200
@@ -810,7 +810,7 @@ static MagickBooleanType WritePDBImage(c
pdb_image.width=(short) (16*(image->columns/16+1));
pdb_image.height=(short) image->rows;
packets=((bits_per_pixel*image->columns+7)/8)*image->rows;
- runlength=(unsigned char *) AcquireQuantumMemory(2UL*packets,
+ runlength=(unsigned char *) AcquireQuantumMemory(4UL*packets,
sizeof(*runlength));
if (runlength == (unsigned char *) NULL)
ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");