Blob Blame History Raw
From 4c5f309925e568f3ccd4bacc1907c082401c13cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Nikola=20Forr=C3=B3?= <nforro@redhat.com>
Date: Thu, 6 Dec 2018 14:42:00 +0100
Subject: [PATCH 01/10] Fix CVE-2016-3186

---
 tools/gif2tiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/gif2tiff.c b/tools/gif2tiff.c
index 1e9b4b9..e89ac5b 100644
--- a/tools/gif2tiff.c
+++ b/tools/gif2tiff.c
@@ -316,7 +316,7 @@ readextension(void)
     char buf[255];
 
     (void) getc(infile);
-    while ((count = getc(infile)))
+    while ((count = getc(infile)) && count >= 0 && count <= 255)
         fread(buf, 1, count, infile);
 }
 
-- 
2.17.2