File ImageMagick-CVE-2017-14172.patch of Package ImageMagick.15344

Index: ImageMagick-6.8.8-1/coders/ps.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/ps.c	2017-12-05 11:36:18.807738411 +0100
+++ ImageMagick-6.8.8-1/coders/ps.c	2017-12-05 11:36:40.996122025 +0100
@@ -575,6 +575,8 @@ static Image *ReadPSImage(const ImageInf
         if (count != 1)
           continue;
         length=extent;
+        if (length > GetBlobSize(image))
+          ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
         profile=BlobToStringInfo((const void *) NULL,length);
         if (profile == (StringInfo *) NULL)
           continue;
openSUSE Build Service is sponsored by