Skip to content

zlib: fix node crashing on invalid options

Rodrigo Muino Tomonari requested to merge github/fork/aqrln/fix-13082 into master

This PR fixes the Node process crashing when constructors of classes of the zlib module are given invalid options.

  • Throw an Error when the zlib library rejects the value of windowBits, instead of crashing with an assertion.
  • Treat windowBits and memLevel options consistently with other ones and don't crash when non-numeric values are given.

Fixes: https://github.com/nodejs/node/issues/13082

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

zlib

Merge request reports

Loading