Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
buffer: ignore negative allocation lengths
Treat negative length arguments to `Buffer()`/`allocUnsafe()` as if they were zero so the allocation does not affect the pool’s offset. Fixes: nodejs#7047 Refs: nodejs#7051 PR-URL: nodejs#7221 Reviewed-By: Trevor Norris <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information