-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.
Description
From the buf[i]
documentation for Buffer
, it's unclear whether the following code produces undefined behavior due to out-of-bounds access or does nothing:
new Buffer('')[1000] = 42
I think this should be documented.
(I assume it's bounds-checked since console.log(new Buffer('')[1000])
prints undefined
rather than 0
, but I haven't checked the source.)
Metadata
Metadata
Assignees
Labels
bufferIssues and PRs related to the buffer subsystem.Issues and PRs related to the buffer subsystem.docIssues and PRs related to the documentations.Issues and PRs related to the documentations.