Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nodejsUtils: additional Buffer safeguards for older Node.js
1. In allocBuffer(), ensure buffers allocated with new Buffer() are zero-filled. On newer Node.js versions, Buffer.alloc() zero-fills already. 2. In newBufferFrom(), throw when 'data' argument is a number. On newer Node.js versions, Buffer.from(number)/new Buffer(number, encooding) throw already.
- Loading branch information