File ImageMagick-CVE-2016-8862.patch of Package ImageMagick.5842

From aea6c6507f55632829e6432f8177a084a57c9fcc Mon Sep 17 00:00:00 2001
From: Cristy <urban-warrior@imagemagick.org>
Date: Fri, 7 Oct 2016 17:01:22 -0400
Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/271

---
 coders/rle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: ImageMagick-6.8.8-1/coders/rle.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/rle.c	2016-11-09 20:53:39.288818091 +0100
+++ ImageMagick-6.8.8-1/coders/rle.c	2016-11-09 21:52:32.691503839 +0100
@@ -226,8 +226,11 @@ static Image *ReadRLEImage(const ImageIn
     number_planes=1UL*ReadBlobByte(image);
     bits_per_pixel=1UL*ReadBlobByte(image);
     number_colormaps=1UL*ReadBlobByte(image);
+    map_length=(unsigned char) ReadBlobByte(image);
+    if (map_length >= 32)
+      ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     one=1;
-    map_length=one << ReadBlobByte(image);
+    map_length=one << map_length;
     if ((number_planes == 0) || (number_planes == 2) || (bits_per_pixel != 8) ||
         (image->columns == 0))
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
openSUSE Build Service is sponsored by