File GraphicsMagick-CVE-2017-18271.patch of Package GraphicsMagick.openSUSE_Leap_42.3_Update

Index: GraphicsMagick-1.2.5/coders/miff.c
===================================================================
--- GraphicsMagick-1.2.5.orig/coders/miff.c	2018-05-23 11:25:07.865547386 +0200
+++ GraphicsMagick-1.2.5/coders/miff.c	2018-05-23 11:25:56.642318069 +0200
@@ -1174,6 +1174,8 @@ static Image *ReadMIFFImage(const ImageI
               p=image->directory+strlen(image->directory);
             }
           c=ReadBlobByte(image);
+          if (c == EOF)
+            break;
           *p++=c;
         } while (c != '\0');
       }
openSUSE Build Service is sponsored by