File ImageMagick-CVE-2019-13310.patch of Package ImageMagick.19146

Index: ImageMagick-7.0.7-34/MagickWand/mogrify.c
===================================================================
--- ImageMagick-7.0.7-34.orig/MagickWand/mogrify.c	2019-07-23 12:53:39.569655358 +0200
+++ ImageMagick-7.0.7-34/MagickWand/mogrify.c	2019-07-23 12:53:40.261659454 +0200
@@ -7871,6 +7871,8 @@ WandExport MagickBooleanType MogrifyImag
               &distortion,exception);
             if (difference_image == (Image *) NULL)
               break;
+            reconstruct_image=DestroyImage(reconstruct_image);
+            image=DestroyImage(image);
             if (*images != (Image *) NULL)
               *images=DestroyImage(*images);
             *images=difference_image;
@@ -8259,6 +8261,7 @@ WandExport MagickBooleanType MogrifyImag
                    q=GetImageFromList(*images,index-1);
                    if (q == (Image *) NULL)
                      {
+                       p=DestroyImage(p);
                        (void) ThrowMagickException(exception,GetMagickModule(),
                          OptionError,"NoSuchImage","`%s'",argv[i+1]);
                        status=MagickFalse;
openSUSE Build Service is sponsored by