File ImageMagick-CVE-2022-2719.patch of Package ImageMagick.30356

Index: ImageMagick-7.0.7-34/MagickWand/operation.c
===================================================================
--- ImageMagick-7.0.7-34.orig/MagickWand/operation.c
+++ ImageMagick-7.0.7-34/MagickWand/operation.c
@@ -4786,7 +4786,8 @@ WandPrivate void CLINoImageOperator(Magi
       if (IfPlusOp)
         write_images=CloneImageList(_images,_exception);
       write_info=CloneImageInfo(_image_info);
-      (void) WriteImages(write_info,write_images,arg1,_exception);
+      if (write_images != (Image *) NULL)
+        (void) WriteImages(write_info,write_images,arg1,_exception);
       write_info=DestroyImageInfo(write_info);
       if (IfPlusOp)
         write_images=DestroyImageList(write_images);
openSUSE Build Service is sponsored by