Commit 88560531 authored by Tim Yamin's avatar Tim Yamin Committed by Chris Wright

[PATCH] Update in-kernel zlib routines (CAN-2005-2458, CAN-2005-2459)

Fix outstanding security bugs in the Linux zlib implementations. See:

a) http://sources.redhat.com/ml/bug-gnu-utils/1999-06/msg00183.html
CAN-2005-2458

b) http://bugs.gentoo.org/show_bug.cgi?id=94584
CAN-2005-2459
Signed-off-by: default avatarTim Yamin <plasmaroo@gentoo.org>
Signed-off-by: default avatarTavis Ormandy <taviso@gentoo.org>
Signed-off-by: default avatarChris Wright <chrisw@osdl.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8f5a9b18
......@@ -1307,7 +1307,7 @@ local int huft_build(
{
*t = (inflate_huft *)Z_NULL;
*m = 0;
return Z_OK;
return Z_DATA_ERROR;
}
......@@ -1351,6 +1351,7 @@ local int huft_build(
if ((j = *p++) != 0)
v[x[j]++] = i;
} while (++i < n);
n = x[g]; /* set n to length of v */
/* Generate the Huffman codes and for each, make the table entries */
......
......@@ -326,7 +326,7 @@ DEBG("huft1 ");
{
*t = (struct huft *)NULL;
*m = 0;
return 0;
return 2;
}
DEBG("huft2 ");
......@@ -374,6 +374,7 @@ DEBG("huft5 ");
if ((j = *p++) != 0)
v[x[j]++] = i;
} while (++i < n);
n = x[g]; /* set n to length of v */
DEBG("h6 ");
......@@ -410,6 +411,7 @@ DEBG1("1 ");
DEBG1("2 ");
f -= a + 1; /* deduct codes from patterns left */
xp = c + k;
if (j < z)
while (++j < z) /* try smaller tables up to z bits */
{
if ((f <<= 1) <= *++xp)
......
......@@ -141,7 +141,7 @@ static int huft_build(
{
*t = NULL;
*m = 0;
return Z_OK;
return Z_DATA_ERROR;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment