mirror of https://github.com/nodejs/node.git
doc: minor clarification in buffer.markdown
Replaced "contents is" with "contents are". Added a note that initial Buffer contents could contain sensitive data. PR-URL: https://github.com/nodejs/node/pull/2574 Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>pull/2574/head
parent
87df7d3be3
commit
d6714ff1a4
|
@ -68,8 +68,8 @@ Allocates a new buffer of `size` bytes. `size` must be less than
|
||||||
otherwise a `RangeError` is thrown.
|
otherwise a `RangeError` is thrown.
|
||||||
|
|
||||||
Unlike `ArrayBuffers`, the underlying memory for buffers is not initialized. So
|
Unlike `ArrayBuffers`, the underlying memory for buffers is not initialized. So
|
||||||
the contents of a newly created `Buffer` is unknown. Use `buf.fill(0)`to
|
the contents of a newly created `Buffer` are unknown and could contain
|
||||||
initialize a buffer to zeroes.
|
sensitive data. Use `buf.fill(0)` to initialize a buffer to zeroes.
|
||||||
|
|
||||||
### new Buffer(array)
|
### new Buffer(array)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue