File ImageMagick-CVE-2017-14733.patch of Package ImageMagick.8212

Index: ImageMagick-6.4.3/coders/rle.c
===================================================================
--- ImageMagick-6.4.3.orig/coders/rle.c	2017-12-06 10:10:38.410071811 +0100
+++ ImageMagick-6.4.3/coders/rle.c	2017-12-06 10:12:11.531616784 +0100
@@ -247,8 +247,8 @@ static Image *ReadRLEImage(const ImageIn
       ThrowRLEException(CorruptImageError,"UnexpectedEndOfFile");
     one=1;
     map_length=one << map_length;
-    if ((number_planes == 0) || (number_planes == 2) || (bits_per_pixel != 8) ||
-        (image->columns == 0))
+    if ((number_planes == 0) || (number_planes == 2) || ((flags & 0x04) &&
+        ((number_planes <= 2) || number_planes > 254)) || (bits_per_pixel != 8))
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
     if (flags & 0x02)
       {