File ImageMagick-CVE-2018-11624.patch of Package ImageMagick.16417

Index: ImageMagick-7.0.7-34/coders/mat.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/mat.c	2018-06-14 13:00:41.990230080 +0200
+++ ImageMagick-7.0.7-34/coders/mat.c	2018-06-14 13:02:11.059587743 +0200
@@ -1078,7 +1078,7 @@ MATLAB_KO:
         MATLAB_HDR.StructureClass != mxINT64_CLASS &&
         MATLAB_HDR.StructureClass != mxUINT64_CLASS)    /* uint64 + uint64 3D */
       {
-        if (image2 != (Image*) NULL)
+        if ((image2 != (Image*) NULL) && (image2 != image))
           {
             CloseBlob(image2);
             DeleteImageFromList(&image2);
openSUSE Build Service is sponsored by