Commit Graph

2 Commits

Author SHA1 Message Date
Сковорода Никита Андреевич
38d7258d89 buffer: zero-fill uninitialized bytes in .concat()
This makes sure that no uninitialized bytes are leaked when the specified
`totalLength` input value is greater than the actual total length of the
specified buffers array, e.g. in Buffer.concat([Buffer.alloc(0)], 100).

PR-URL: https://github.com/nodejs/node-private/pull/66
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2016-09-28 00:09:14 +10:00
isaacs
d53cdc5378 Add Buffer.concat method
We write out this loop a lot of places throughout node.
It clearly needs to be an API method.
2012-06-11 15:51:23 -07:00