]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/902
authorCristy <urban-warrior@imagemagick.org>
Tue, 19 Dec 2017 18:59:24 +0000 (13:59 -0500)
committerCristy <urban-warrior@imagemagick.org>
Tue, 19 Dec 2017 18:59:24 +0000 (13:59 -0500)
coders/png.c

index caef8e017a0e8d6973306c97a22623bee87007b8..1c691c66e00e04fd1984f308d1f006499f4a02ea 100644 (file)
@@ -9250,10 +9250,12 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info,
 
             image->colors = image_colors;
 
-            if (AcquireImageColormap(image,image_colors,exception) ==
-                MagickFalse)
-               ThrowWriterException(ResourceLimitError,
-                   "MemoryAllocationFailed");
+            if (AcquireImageColormap(image,image_colors,exception) == MagickFalse)
+              {
+                (void) ThrowMagickException(exception,GetMagickModule(),
+                  ResourceLimitError,"MemoryAllocationFailed","`%s'",
+                IMimage->filename);
+              }
 
             for (i=0; i< (ssize_t) image_colors; i++)
                image->colormap[i] = colormap[i];