Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: #2634 PR-URL: #2635 Reviewed-By: trevnorris - Trevor Norris <firstname.lastname@example.org> Reviewed-By: cjihrig - Colin Ihrig <email@example.com>
- Loading branch information
Showing 2 changed files with 57 additions and 2 deletions.