summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2001-03-09 01:03:50 +0000
committerPaul Mackerras <paulus@samba.org>2001-03-09 01:03:50 +0000
commite4a31c6f37af0b063e7bd9b2807ca387d75f8ae1 (patch)
tree7dc3499b3ef8b12949059d1d48425b0961f2a6b2 /modules
parent8f4eec837744bbcd19dca09347640b104fdd5e5e (diff)
downloadppp-e4a31c6f37af0b063e7bd9b2807ca387d75f8ae1.tar.gz
workaround zlib bug
Diffstat (limited to 'modules')
-rw-r--r--modules/deflate.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/modules/deflate.c b/modules/deflate.c
index d5e5cce..f77f6eb 100644
--- a/modules/deflate.c
+++ b/modules/deflate.c
@@ -27,7 +27,7 @@
* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
* OR MODIFICATIONS.
*
- * $Id: deflate.c,v 1.9 1999/01/19 23:58:35 paulus Exp $
+ * $Id: deflate.c,v 1.10 2001/03/09 01:03:50 paulus Exp $
*/
#ifdef AIX4
@@ -202,7 +202,11 @@ z_comp_alloc(options, opt_len)
|| options[3] != DEFLATE_CHK_SEQUENCE)
return NULL;
w_size = DEFLATE_SIZE(options[2]);
- if (w_size < DEFLATE_MIN_SIZE || w_size > DEFLATE_MAX_SIZE)
+ /*
+ * N.B. the 9 below should be DEFLATE_MIN_SIZE (8), but using
+ * 8 will cause kernel crashes because of a bug in zlib.
+ */
+ if (w_size < 9 || w_size > DEFLATE_MAX_SIZE)
return NULL;
@@ -454,7 +458,11 @@ z_decomp_alloc(options, opt_len)
|| options[3] != DEFLATE_CHK_SEQUENCE)
return NULL;
w_size = DEFLATE_SIZE(options[2]);
- if (w_size < DEFLATE_MIN_SIZE || w_size > DEFLATE_MAX_SIZE)
+ /*
+ * N.B. the 9 below should be DEFLATE_MIN_SIZE (8), but using
+ * 8 will cause kernel crashes because of a bug in zlib.
+ */
+ if (w_size < 9 || w_size > DEFLATE_MAX_SIZE)
return NULL;
#ifdef __osf__