Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

new Buffer() can contain any content #7230

Closed
phedny opened this issue Mar 3, 2014 · 2 comments
Closed

new Buffer() can contain any content #7230

phedny opened this issue Mar 3, 2014 · 2 comments

Comments

@phedny
Copy link

phedny commented Mar 3, 2014

When creating a new Buffer using "new Buffer(size)", the buffer can contain any data. I was assuming the buffer to contain just zeroes, but this assumption is not correct.

If this is behaviour is intended, e.g. because of performance concerns, please update the documentation to reflect the fact that the returned buffer may contain random values.

@indutny
Copy link
Member

indutny commented Mar 3, 2014

@phedny this is correct, would you mind submitting a Pull Request that would fix a documentation?

@jasnell
Copy link
Member

jasnell commented Jun 24, 2015

PR submitted. Closing this here.

@jasnell jasnell closed this as completed Jun 24, 2015
jasnell pushed a commit that referenced this issue Jun 26, 2015
fixes #7230

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #25565
jasnell pushed a commit to jasnell/node-joyent that referenced this issue Jun 29, 2015
fixes nodejs#7230

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#25565
jasnell pushed a commit that referenced this issue Aug 4, 2015
fixes #7230

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #25591
jasnell added a commit to jasnell/node that referenced this issue Aug 4, 2015
per: nodejs/node-v0.x-archive@53b6a61

fixes nodejs/node-v0.x-archive#7230

Original commit patch did not apply cleanly

Originally contributed by @sarathms
jBarz pushed a commit to ibmruntimes/node that referenced this issue Nov 4, 2016
fixes nodejs#7230

Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#25591
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants