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

From 7beec9a7a8a5701652b313e6e94bafd36b3627dc Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Fri, 7 Jul 2017 07:06:39 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/548

---
 coders/pes.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Index: ImageMagick-6.8.8-1/coders/pes.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/pes.c	2017-10-25 14:16:17.212653699 +0200
+++ ImageMagick-6.8.8-1/coders/pes.c	2017-10-25 14:16:17.220653841 +0200
@@ -622,7 +622,10 @@ static Image *ReadPESImage(const ImageIn
   image->rows=bounds.y2-bounds.y1;
   status=SetImageExtent(image,image->columns,image->rows);
   if (status == MagickFalse)
-    return(DestroyImageList(image));
+    {
+      stitches=(PointInfo *) RelinquishMagickMemory(stitches);
+      return(DestroyImageList(image));
+    }
   /*
     Write stitches as SVG file.
   */
@@ -652,6 +655,7 @@ static Image *ReadPESImage(const ImageIn
   }
   (void) FormatLocaleFile(file,"</svg>\n");
   (void) fclose(file);
+  stitches=(PointInfo *) RelinquishMagickMemory(stitches);
   (void) CloseBlob(image);
   image=DestroyImage(image);
   /*