File ImageMagick-CVE-2017-1000476.patch of Package ImageMagick.6416

From e5dae180b9236bccd73ce93bfce81e99232a8533 Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Fri, 17 Nov 2017 07:36:35 -0500
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/867

---
 coders/dds.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/coders/dds.c b/coders/dds.c
index a9ed2ad331..a4fbbc555a 100644
--- a/coders/dds.c
+++ b/coders/dds.c
@@ -2402,6 +2402,8 @@ static MagickBooleanType SkipDXTMipmaps(Image *image,DDSInfo *dds_info,
           break;
         w = DIV2(w);
         h = DIV2(h);
+        if ((w == 1) && (h == 1))
+          break;
       }
     }
   return(MagickTrue);
@@ -2449,6 +2451,8 @@ static MagickBooleanType SkipRGBMipmaps(Image *image,DDSInfo *dds_info,
           break;
         w = DIV2(w);
         h = DIV2(h);
+        if ((w == 1) && (h == 1))
+          break;
       }
     }
   return(MagickTrue);
openSUSE Build Service is sponsored by