File ImageMagick-CVE-2014-9835,9831.patch of Package ImageMagick.8212

Index: ImageMagick-6.8.9-8/coders/wpg.c
===================================================================
--- ImageMagick-6.8.9-8.orig/coders/wpg.c	2016-06-15 07:22:31.720737019 +0200
+++ ImageMagick-6.8.9-8/coders/wpg.c	2016-06-15 07:23:39.581841576 +0200
@@ -474,7 +474,7 @@ static int UnpackWPGRaster(Image *image,
 
   ldblk=(ssize_t) ((bpp*image->columns+7)/8);
   BImgBuff=(unsigned char *) AcquireQuantumMemory((size_t) ldblk,
-    sizeof(*BImgBuff));
+    8*sizeof(*BImgBuff));
   if(BImgBuff==NULL) return(-2);
 
   while(y<(ssize_t) image->rows)