File giflib-CVE-2016-3977.patch of Package giflib

--- giflib-5.0.5/util/gif2rgb.c	2013-08-29 21:56:39.000000000 +0200
+++ giflib-5.0.5/util/gif2rgb.c	2016-04-12 09:56:38.836157310 +0200
@@ -473,6 +473,12 @@
         exit(EXIT_FAILURE);
     }
 
+    /* check that the background color isn't garbage (SF bug #87) */
+    if (GifFile->SBackGroundColor < 0 || GifFile->SBackGroundColor >= ColorMap->ColorCount) {
+        fprintf(stderr, "Background color out of range for colormap\n");
+        exit(EXIT_FAILURE);
+    }
+
     DumpScreen2RGB(OutFileName, OneFileFlag,
 		   ColorMap,
 		   ScreenBuffer, 
openSUSE Build Service is sponsored by