Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v7.x backport) zlib: fix node crashing on invalid options #13199

Closed
wants to merge 2 commits into from

Conversation

aqrln
Copy link
Contributor

@aqrln aqrln commented May 24, 2017

This is a partial backport of semver-patch bits of 9e4660b.

This commit 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.

Refs: #13098

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

This is a partial backport of semver-patch bits of
9e4660b.

This commit 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.

Refs: nodejs#13098
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. v7.x zlib Issues and PRs related to the zlib subsystem. labels May 24, 2017
Copy link
Contributor

@refack refack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nits from #13201

@aqrln
Copy link
Contributor Author

aqrln commented May 25, 2017

@Trott
Copy link
Member

Trott commented Jul 15, 2017

Unfortunately, there are no more 7.x releases planned. Sorry this was never landed! I'm going to close it now.

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++. zlib Issues and PRs related to the zlib subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants