Work around zlib bug where using a deflate window size of 8 will
cause memory corruption.
This commit is contained in:
parent
b76d0b3217
commit
3f31f1ab4c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=93013
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user