From: Tim Yamin Fix outstanding security bugs in the Linux zlib implementations. See: a) http://sources.redhat.com/ml/bug-gnu-utils/1999-06/msg00183.html b) http://bugs.gentoo.org/show_bug.cgi?id=94584 Signed-off-by: Tim Yamin Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Andrew Morton --- arch/ppc64/boot/zlib.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN arch/ppc64/boot/zlib.c~fix-outstanding-gzip-zlib-security-issues-ppc64 arch/ppc64/boot/zlib.c --- 25/arch/ppc64/boot/zlib.c~fix-outstanding-gzip-zlib-security-issues-ppc64 Tue Jul 26 13:34:35 2005 +++ 25-akpm/arch/ppc64/boot/zlib.c Tue Jul 26 13:34:35 2005 @@ -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 */ _