GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — doc: clarify `length` param in `buffer.write` by HarshithaKP · Pull Request #32119 · nodejs/node Conversation
Member
proof: #node > let buf = Buffer.alloc(10) undefined > buf <Buffer 00 00 00 00 00 00 00 00 00 00> > buf.write(‘abcd’, 3) 4 > buf <Buffer 00 00 00 61 62 63 64 00 00 00> > buf = Buffer.alloc(10) <Buffer 00 00 00 00 00 00 00 00 00 00> > buf.write(‘abcd’, 9) 1 > buf <Buffer 00 00 00 00 00 00 00 00 00 61> > Refs : #32104 (comment) Thanks to @addaleax for her suggestion in the above comment, that lead to this finding. Checklist
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
HarshithaKP
added a commit
to HarshithaKP/node
that referenced
this pull request
Make sure longer strings are written up to the buffer end Refs: nodejs#32119
2 of 4 tasks
BridgeAR
reviewed
Uh oh!
There was an error while loading. Please reload this page.
jasnell
reviewed
Uh oh!
There was an error while loading. Please reload this page.
jasnell
approved these changes
addaleax
pushed a commit
that referenced
this pull request
Make sure longer strings are written up to the buffer end Refs: #32119 PR-URL: #32123 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. `buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs : nodejs#32104 (comment)
HarshithaKP
force-pushed
the
clarify_buffer.write_length
branch
from
73ae863 to
7841713
Compare
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
addaleax
reviewed
Uh oh!
There was an error while loading. Please reload this page.
BridgeAR
pushed a commit
that referenced
this pull request
Make sure longer strings are written up to the buffer end Refs: #32119 PR-URL: #32123 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
MylesBorins
pushed a commit
that referenced
this pull request
Make sure longer strings are written up to the buffer end Refs: #32119 PR-URL: #32123 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
addaleax
reviewed
Uh oh!
There was an error while loading. Please reload this page.
addaleax
reviewed
Uh oh!
There was an error while loading. Please reload this page.
addaleax
approved these changes
addaleax
pushed a commit
that referenced
this pull request
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs: #32104 (comment) PR-URL: #32119 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
BethGriggs
pushed a commit
that referenced
this pull request
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs: #32104 (comment) PR-URL: #32119 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
targos
pushed a commit
that referenced
this pull request
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs: #32104 (comment) PR-URL: #32119 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
targos
pushed a commit
that referenced
this pull request
Make sure longer strings are written up to the buffer end Refs: #32119 PR-URL: #32123 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
targos
pushed a commit
that referenced
this pull request
`buffer.write` documentation has an incaccuracy w.r.t the `length` parameter: It says default number of bytes written is `buf.length - offset`. Change it to: If the buffer has sufficient space from the offset, the string is written upto `length`. If the buffer is short in space, only `buf.length - offset` bytes are written. Refs: #32104 (comment) PR-URL: #32119 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabelsProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | |||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |