0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/doc
Alexey Orlenko 9e4660b518
zlib: fix node crashing on invalid options
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.

* Fix bugs in the validation logic:
  - Don't conflate 0 and undefined when checking if a field of an
    options object exists.
  - Treat NaN and Infinity values the same way as values of invalid
    types instead of allowing to actually set zlib options to NaN or
    Infinity.

PR-URL: https://github.com/nodejs/node/pull/13098
Fixes: https://github.com/nodejs/node/issues/13082
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2017-05-22 01:10:44 +03:00
..
api zlib: fix node crashing on invalid options 2017-05-22 01:10:44 +03:00
api_assets doc: reduce font size on smaller screens 2017-03-09 10:59:24 +01:00
changelogs doc: fix links from ToC to subsection for 4.8.x 2017-05-18 17:14:17 +01:00
guides doc: update doc to remove usage of "you" 2017-05-18 21:25:48 -04:00
.eslintrc.yaml doc: add no-var, prefer-const in doc eslintrc 2017-04-25 00:06:39 +03:00
full-white-stripe.jpg
node.1 src: allow CLI args in env with NODE_OPTIONS 2017-04-25 09:59:54 -07:00
onboarding-extras.md doc: add suggestion to use --3way 2017-04-21 11:47:48 -04:00
onboarding.md doc: correct git fix whitespace command 2017-04-18 08:30:38 -07:00
osx_installer_logo.png
releases.md doc: update Mac OS X references in releases.md 2017-04-04 10:14:40 -07:00
STYLE_GUIDE.md doc: change Mac OS X to macOS 2017-04-04 10:14:24 -07:00
template.html tools,doc: add Google Analytics tracking. 2017-01-25 21:54:34 +01:00
thin-white-stripe.jpg