src: avoid hanging on Buffer#fill 0-length input
Previously, zero-length Buffers and TypedArrays passed as fillers hanged Buffer#fill and Buffer.from. This changes those cases when it hanged to a zero-fill instead, which should be backwards compatible. This fixes CVE-2018-7167. PR-URL: https://github.com/nodejs-private/node-private/pull/120 Fixes: https://github.com/nodejs-private/security/issues/193 Refs: https://github.com/nodejs-private/node-private/pull/118 Reviewed-By:Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Evan Lucas <evanlucas@me.com> Reviewed-By:
Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
parent
0b4a0891
Please register or sign in to comment