File GraphicsMagick-CVE-2018-20189.patch of Package GraphicsMagick.10463

--- a/coders/dib.c	Sun Dec 16 09:51:58 2018 -0600
+++ b/coders/dib.c	Sun Dec 16 18:24:04 2018 -0600
@@ -646,9 +646,11 @@
     ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
   if (dib_info.colors_important > 256)
     ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
+  if ((dib_info.number_colors != 0) && (dib_info.bits_per_pixel > 8))
+    ThrowReaderException(CorruptImageError,ImproperImageHeader,image);
   if ((dib_info.image_size != 0U) && (dib_info.image_size > file_size))
     ThrowReaderException(CorruptImageError,UnexpectedEndOfFile,image);
-  if ((dib_info.number_colors != 0) || (dib_info.bits_per_pixel < 16))
+  if ((dib_info.number_colors != 0) || (dib_info.bits_per_pixel <= 8))
     {
       image->storage_class=PseudoClass;
       image->colors=dib_info.number_colors;
openSUSE Build Service is sponsored by