-
-
Notifications
You must be signed in to change notification settings - Fork 34k
Closed
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.
Description
- Version: v6.1.0
- Platform: Win10 x64
var a = new Buffer('1', 'hex') creates a new empty buffer. This throws an error on earlier versions of node (tested on v5.8) as the input length should be a multiple of 1 byte.
Probably introduced by afd821a in lib/buffer.js. The length check returns 0 which would have normally gone on to raise an error at a later stage but is now short circuited by the new code.
Could probably just do with an extra line to check if the input is non empty or have byteLength return a fractional value.
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.