File ImageMagick-CVE-2018-10805.patch of Package ImageMagick.30356

Index: ImageMagick-7.0.7-34/coders/bgr.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/bgr.c
+++ ImageMagick-7.0.7-34/coders/bgr.c
@@ -983,6 +983,8 @@ static Image *ReadBGRImage(const ImageIn
         if (GetNextImageInList(image) == (Image *) NULL)
           {
             image=DestroyImageList(image);
+            quantum_info=DestroyQuantumInfo(quantum_info);
+            canvas_image=DestroyImage(canvas_image);
             return((Image *) NULL);
           }
         image=SyncNextImageInList(image);
Index: ImageMagick-7.0.7-34/coders/rgb.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/rgb.c
+++ ImageMagick-7.0.7-34/coders/rgb.c
@@ -968,6 +968,8 @@ static Image *ReadRGBImage(const ImageIn
         if (GetNextImageInList(image) == (Image *) NULL)
           {
             image=DestroyImageList(image);
+            quantum_info=DestroyQuantumInfo(quantum_info);
+            canvas_image=DestroyImage(canvas_image);
             return((Image *) NULL);
           }
         image=SyncNextImageInList(image);
Index: ImageMagick-7.0.7-34/coders/cmyk.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/cmyk.c
+++ ImageMagick-7.0.7-34/coders/cmyk.c
@@ -1095,6 +1095,8 @@ static Image *ReadCMYKImage(const ImageI
         if (GetNextImageInList(image) == (Image *) NULL)
           {
             image=DestroyImageList(image);
+            quantum_info=DestroyQuantumInfo(quantum_info);
+            canvas_image=DestroyImage(canvas_image);
             return((Image *) NULL);
           }
         image=SyncNextImageInList(image);
Index: ImageMagick-7.0.7-34/coders/gray.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/gray.c
+++ ImageMagick-7.0.7-34/coders/gray.c
@@ -694,6 +694,8 @@ static Image *ReadGRAYImage(const ImageI
         if (GetNextImageInList(image) == (Image *) NULL)
           {
             image=DestroyImageList(image);
+            quantum_info=DestroyQuantumInfo(quantum_info);
+            canvas_image=DestroyImage(canvas_image);
             return((Image *) NULL);
           }
         image=SyncNextImageInList(image);
Index: ImageMagick-7.0.7-34/coders/ycbcr.c
===================================================================
--- ImageMagick-7.0.7-34.orig/coders/ycbcr.c
+++ ImageMagick-7.0.7-34/coders/ycbcr.c
@@ -969,6 +969,8 @@ static Image *ReadYCBCRImage(const Image
         if (GetNextImageInList(image) == (Image *) NULL)
           {
             image=DestroyImageList(image);
+            quantum_info=DestroyQuantumInfo(quantum_info);
+            canvas_image=DestroyImage(canvas_image);
             return((Image *) NULL);
           }
         image=SyncNextImageInList(image);
openSUSE Build Service is sponsored by