File ImageMagick-CVE-2018-11251.patch of Package ImageMagick.19143
Index: ImageMagick-6.8.8-1/coders/sun.c
===================================================================
--- ImageMagick-6.8.8-1.orig/coders/sun.c 2018-05-23 14:54:14.277630461 +0200
+++ ImageMagick-6.8.8-1/coders/sun.c 2018-05-23 14:54:32.737886856 +0200
@@ -371,6 +371,8 @@ static Image *ReadSUNImage(const ImageIn
image->colors=one << sun_info.depth;
if (sun_info.maptype == RMT_EQUAL_RGB)
image->colors=sun_info.maplength/3;
+ if (image->colors == 0)
+ ThrowReaderException(CorruptImageError,"ImproperImageHeader");
if (AcquireImageColormap(image,image->colors) == MagickFalse)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
}