1
Description: Fix heap overflow with broken/crafted GIF files. [CVE-2011-3170]
2
Origin: http://cups.org/str.php?L3914
4
Index: filter/image-gif.c
5
===================================================================
6
--- a/filter/image-gif.c (revision 9862)
7
+++ b/filter/image-gif.c (working copy)
14
+ if (sp < (stack + 8192))
20
- while (code >= clear_code)
21
+ while (code >= clear_code && sp < (stack + 8192))
23
*sp++ = table[1][code];
24
if (code == table[0][code])
26
code = table[0][code];
29
- *sp++ = firstcode = table[1][code];
31
+ if (sp < (stack + 8192))
32
+ *sp++ = firstcode = table[1][code];
38
table[0][code] = oldcode;