diff --git a/lib/zlib/deflate.js b/lib/zlib/deflate.js index 0f9bbad..856be4f 100644 --- a/lib/zlib/deflate.js +++ b/lib/zlib/deflate.js @@ -1329,7 +1329,7 @@ const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => { if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { + strategy < 0 || strategy > Z_FIXED || (windowBits === 8 && wrap !== 1)) { return err(strm, Z_STREAM_ERROR); }