buffer: SlowBuffer only accept valid numeric values
Fixes a regression that appeared with the new Buffer implementation in v3. Without this change, calling the SlowBuffer constructor with something else than a number would abort on the C++ side. This makes sure that the length argument is coerced to number or is 0. Fixes: https://github.com/nodejs/node/issues/2634 PR-URL: https://github.com/nodejs/node/pull/2635 Reviewed-By:trevnorris - Trevor Norris <trev.norris@gmail.com> Reviewed-By:
cjihrig - Colin Ihrig <cjihrig@gmail.com>
parent
2ffb21ba
Please register or sign in to comment