Skip to content

zlib: fix node crashing on invalid options#13098

Closed
aqrln wants to merge 6 commits intonodejs:masterfrom
aqrln:fix-13082
Closed

zlib: fix node crashing on invalid options#13098
aqrln wants to merge 6 commits intonodejs:masterfrom
aqrln:fix-13082

Conversation

@aqrln
Copy link
Contributor

@aqrln aqrln commented May 18, 2017

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: #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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. semver-major PRs that contain breaking changes and should be released in the next major version. zlib Issues and PRs related to the zlib subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zlib assertion error