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

From d06bf16cc05a8b859387be2ea16f2056ded34afa Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Fri, 1 Sep 2017 09:23:12 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/713

---
 coders/txt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: ImageMagick-6.8.8-1/coders/txt.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/txt.c	2017-11-01 09:40:15.251052994 +0100
+++ ImageMagick-6.8.8-1/coders/txt.c	2017-11-01 09:41:01.619847719 +0100
@@ -432,6 +432,8 @@ static Image *ReadTXTImage(const ImageIn
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     image->columns=width;
     image->rows=height;
+    if ((max_value == 0) || (max_value > 4294967295))
+      ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     for (depth=1; (GetQuantumRange(depth)+1) < max_value; depth++) ;
     image->depth=depth;
     LocaleLower(colorspace);