Unverified Commit 7bc5151d authored by Anand Suresh's avatar Anand Suresh Committed by Ruben Bridgewater
Browse files

zlib: fix windowBits validation to allow 0 for decompression mode

From the zlib v1.2.11 manual:

> ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
>                                      int  windowBits));
>
> ...
> windowBits can also be zero to request that inflate use the window
> size in the zlib header of the compressed stream.

The current validation of windowBits in zlib.js doesn't check for this
case.

PR-URL: https://github.com/nodejs/node/pull/19686


Reviewed-By: default avatarRichard Lau <riclau@uk.ibm.com>
Reviewed-By: default avatarLuigi Pinca <luigipinca@gmail.com>
parent a6db6404
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment