Work around zlib bug where using a deflate window size of 8 will
cause memory corruption.
This commit is contained in:
parent
9f1452c629
commit
eb4271ee1d
@ -776,7 +776,7 @@ int deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
|
|||||||
windowBits = -windowBits;
|
windowBits = -windowBits;
|
||||||
}
|
}
|
||||||
if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED ||
|
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) {
|
strategy < 0 || strategy > Z_HUFFMAN_ONLY) {
|
||||||
return Z_STREAM_ERROR;
|
return Z_STREAM_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user