Files
node/doc/api
Alexey Orlenko efae43f0ee 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-28 07:00:44 -07:00
..
2016-04-20 16:34:27 -07:00
2017-05-28 07:00:37 -07:00
2017-04-25 00:06:17 +03:00
2017-05-28 07:00:40 -07:00
2017-05-28 07:00:36 -07:00
2017-05-09 15:01:44 +02:00
2016-12-20 12:31:09 -08:00
2016-12-08 13:39:45 -05:00
2017-05-08 09:30:55 -07:00
2017-05-09 15:01:41 +02:00
2017-05-08 09:30:55 -07:00
2017-05-08 09:30:55 -07:00