Blob Blame History Raw
diff -up gzip-1.3.12/inflate.c.cve-2009-2624 gzip-1.3.12/inflate.c
--- gzip-1.3.12/inflate.c.cve-2009-2624	2006-12-21 00:30:17.000000000 +0100
+++ gzip-1.3.12/inflate.c	2010-01-14 14:42:14.670374060 +0100
@@ -335,13 +335,15 @@ int *m;                 /* maximum looku
   } while (--i);
   if (c[0] == n)                /* null input--all zero length codes */
   {
-    q = (struct huft *) malloc (2 * sizeof *q);
+    q = (struct huft *) malloc (3 * sizeof *q);
     if (!q)
       return 3;
-    hufts += 2;
+    hufts += 3;
     q[0].v.t = (struct huft *) NULL;
     q[1].e = 99;    /* invalid code marker */
     q[1].b = 1;
+    q[2].e = 99;    /* invalid code marker */
+    q[2].b = 1;
     *t = q + 1;
     *m = 1;
     return 0;
--- gzip-1.3.12/unlzh.c.orig	2010-01-15 09:16:07.417407717 -0500
+++ gzip-1.3.12/unlzh.c	2010-01-15 09:17:05.828404953 -0500
@@ -151,7 +151,7 @@ local void make_table(nchar, bitlen, tab
     for (i = 1; i <= 16; i++)
 	start[i + 1] = start[i] + (count[i] << (16 - i));
     if ((start[17] & 0xffff) != 0 || tablebits > 16) /* 16 for weight below */
-      error("Bad table (case b)\n"); 
+      gzip_error("Bad table\n"); 
 
     jutbits = 16 - tablebits;
     for (i = 1; i <= (unsigned)tablebits; i++) {