summaryrefslogtreecommitdiffstats
path: root/sys/net/zlib.c
diff options
context:
space:
mode:
authorjedgar <jedgar@FreeBSD.org>2002-03-23 13:05:53 +0000
committerjedgar <jedgar@FreeBSD.org>2002-03-23 13:05:53 +0000
commiteb4271ee1d6c963edc63e82654568ff0c04b336a (patch)
treeec0644e5d1ec9a3f795a7950fc9834f21b9eb584 /sys/net/zlib.c
parent9f1452c6298472b1608e9aafe804c07684bacf6e (diff)
downloadFreeBSD-src-eb4271ee1d6c963edc63e82654568ff0c04b336a.zip
FreeBSD-src-eb4271ee1d6c963edc63e82654568ff0c04b336a.tar.gz
Work around zlib bug where using a deflate window size of 8 will
cause memory corruption.
Diffstat (limited to 'sys/net/zlib.c')
-rw-r--r--sys/net/zlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/zlib.c b/sys/net/zlib.c
index feef531..03bf230 100644
--- a/sys/net/zlib.c
+++ b/sys/net/zlib.c
@@ -776,7 +776,7 @@ int deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
windowBits = -windowBits;
}
if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
- windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+ windowBits < 9 || windowBits > 15 || level < 0 || level > 9 ||
strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
return Z_STREAM_ERROR;
}
OpenPOWER on IntegriCloud