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: https://github.com/nodejs/node/issues/7047 Refs: https://github.com/nodejs/node/pull/7051 PR-URL: https://github.com/nodejs/node/pull/7221 Reviewed-By:Trevor Norris <trev.norris@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
parent
21552bd0
Please register or sign in to comment