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

From 9fd10cf630832b36a588c1545d8736539b2f1fb5 Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Fri, 21 Jul 2017 07:54:50 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/592

---
 coders/gif.c | 2 ++
 1 file changed, 2 insertions(+)

Index: ImageMagick-6.8.8-1/coders/gif.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/gif.c	2013-12-22 03:08:38.000000000 +0100
+++ ImageMagick-6.8.8-1/coders/gif.c	2017-12-11 13:49:49.889548703 +0100
@@ -1045,6 +1045,8 @@ static Image *ReadGIFImage(const ImageIn
     MagickMax(global_colors,256),3UL*sizeof(*global_colormap));
   if (global_colormap == (unsigned char *) NULL)
     ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+  (void) ResetMagickMemory(global_colormap,0,3*MagickMax(global_colors,256)*
+    sizeof(*global_colormap));
   if (BitSet((int) flag,0x80) != 0)
     count=ReadBlob(image,(size_t) (3*global_colors),global_colormap);
   delay=0;