summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-print/cups/files/cups-1.2.12-CVE-2008-1373.patch')
-rw-r--r--net-print/cups/files/cups-1.2.12-CVE-2008-1373.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/net-print/cups/files/cups-1.2.12-CVE-2008-1373.patch b/net-print/cups/files/cups-1.2.12-CVE-2008-1373.patch
new file mode 100644
index 000000000000..299caa5442dd
--- /dev/null
+++ b/net-print/cups/files/cups-1.2.12-CVE-2008-1373.patch
@@ -0,0 +1,23 @@
+Index: cups-1.2.12/filter/image-gif.c
+===================================================================
+--- cups-1.2.12.orig/filter/image-gif.c
++++ cups-1.2.12/filter/image-gif.c
+@@ -47,6 +47,8 @@
+ #define GIF_INTERLACE 0x40
+ #define GIF_COLORMAP 0x80
+
++#define MAX_LWZ_BITS 12
++
+ typedef cups_ib_t gif_cmap_t[256][4];
+ typedef short gif_table_t[4096];
+
+@@ -471,6 +473,9 @@ gif_read_image(FILE *fp, /* I -
+ pass = 0;
+ code_size = getc(fp);
+
++ if (code_size > MAX_LWZ_BITS)
++ return (-1);
++
+ if (gif_read_lzw(fp, 1, code_size) < 0)
+ return (-1);
+