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

Index: ImageMagick-6.8.8-1/coders/meta.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/meta.c	2017-12-11 15:37:37.597602417 +0100
+++ ImageMagick-6.8.8-1/coders/meta.c	2017-12-11 15:38:25.718433572 +0100
@@ -1967,7 +1967,11 @@ static int formatIPTC(Image *ifile, Imag
     for (tagindx=0; tagindx<taglen; tagindx++)
     {
       c=ReadBlobByte(ifile);
-      if (c == EOF) return -1;
+      if (c == EOF)
+      {
+        str=(unsigned char *) RelinquishMagickMemory(str);
+        return -1;
+      }
       str[tagindx] = (unsigned char) c;
     }
     str[taglen] = 0;