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

From 83e0f8ffd7eeb7661b0ff83257da23d24ca7f078 Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Wed, 19 Jul 2017 13:14:22 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/591

---
 coders/txt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/coders/txt.c b/coders/txt.c
index c3d37fff69..16e7ac2e94 100644
--- a/coders/txt.c
+++ b/coders/txt.c
@@ -563,6 +563,12 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
           break;
       }
     }
+    if (EOFBlob(image) != MagickFalse)
+      {
+        ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+          image->filename);
+        break;
+      }
     (void) ReadBlobString(image,text);
     if (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) == 0)
       {