diff options
author | cPhost <23620441+cPhost@users.noreply.github.com> | 2017-10-28 16:19:53 +0000 |
---|---|---|
committer | Lance Ball <lball@redhat.com> | 2017-10-31 14:37:37 -0400 |
commit | bb59d2bd19cd1e71cc3eeaa4918b36d0980b1c35 (patch) | |
tree | 5e2b79279cfb539be3ed20bbe724860e1e31154e /doc/api/stream.md | |
parent | 8025bba1a38f7d9b8ba152e45c6a9198f5e49186 (diff) | |
download | android-node-v8-bb59d2bd19cd1e71cc3eeaa4918b36d0980b1c35.tar.gz android-node-v8-bb59d2bd19cd1e71cc3eeaa4918b36d0980b1c35.tar.bz2 android-node-v8-bb59d2bd19cd1e71cc3eeaa4918b36d0980b1c35.zip |
repl: avoid crashing from null and undefined errors
When `throw undefined` or `throw null` is executed, the REPL crashes.
This change does a check for `null|undefined` before accessing an
error's properties to prevent crashing.
Fixes: https://github.com/nodejs/node/issues/16545
Fixes: https://github.com/nodejs/node/issues/16607
PR-URL: https://github.com/nodejs/node/pull/16574
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Lance Ball <lball@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'doc/api/stream.md')
0 files changed, 0 insertions, 0 deletions