File GraphicsMagick-CVE-2017-14997.patch of Package GraphicsMagick.9388

diff -r 011296e737a1 -r 0683f8724200 coders/pict.c
--- a/coders/pict.c	Sun Oct 01 15:26:15 2017 -0500
+++ b/coders/pict.c	Sun Oct 01 15:43:56 2017 -0500
@@ -1272,7 +1272,7 @@
             if (length == 0)
               break;
             (void) ReadBlobMSBLong(image);
-            length-=4;
+            length-=Min(4,length);
             if (length == 0)
               break;
             info=MagickAllocateMemory(unsigned char *,length);




openSUSE Build Service is sponsored by