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

Index: ImageMagick-6.8.8-1/coders/miff.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/miff.c	2018-02-13 15:35:23.834554202 +0100
+++ ImageMagick-6.8.8-1/coders/miff.c	2018-02-13 15:48:47.808165755 +0100
@@ -1099,7 +1099,11 @@ static Image *ReadMIFFImage(const ImageI
     if ((LocaleCompare(id,"ImageMagick") != 0) ||
         (image->storage_class == UndefinedClass) ||
         (image->columns == 0) || (image->rows == 0))
-      ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+      {
+        if (profiles != (LinkedListInfo *) NULL)
+          profiles=DestroyLinkedList(profiles,RelinquishMagickMemory);
+        ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+      }
     if (image->montage != (char *) NULL)
       {
         register char