File ImageMagick-CVE-2017-17884.patch of Package ImageMagick.8212

Index: ImageMagick-6.8.8-1/coders/png.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/png.c	2018-01-12 14:39:34.345004797 +0100
+++ ImageMagick-6.8.8-1/coders/png.c	2018-01-12 14:39:47.753233066 +0100
@@ -9026,10 +9026,12 @@ static MagickBooleanType WriteOnePNGImag
 
             image->colors = image_colors;
 
-            if (AcquireImageColormap(image,image_colors) ==
-                MagickFalse)
-               ThrowWriterException(ResourceLimitError,
-                   "MemoryAllocationFailed");
+            if (AcquireImageColormap(image,image_colors) == MagickFalse)
+              {
+                (void) ThrowMagickException(exception,GetMagickModule(),
+                  ResourceLimitError,"MemoryAllocationFailed","`%s'",
+                image->filename);
+              }
 
             for (i=0; i< (ssize_t) image_colors; i++)
                image->colormap[i] = colormap[i];