buffer: fix crash for invalid index types#25154
Closed
addaleax wants to merge 1 commit intonodejs:masterfrom
Closed
buffer: fix crash for invalid index types#25154addaleax wants to merge 1 commit intonodejs:masterfrom
addaleax wants to merge 1 commit intonodejs:masterfrom
Conversation
2555cb4 introduced a crash when a non-number value was passed to `ParseArrayIndex()`. We do not always have JS typechecking for that in place, though. This returns back to the previous behavior of coercing values to integers, which is certainly questionable. Refs: nodejs#22129 Fixes: nodejs#23668
jasnell
approved these changes
Dec 20, 2018
Member
Author
Member
Author
Member
Author
|
Resume CI: https://ci.nodejs.org/job/node-test-pull-request/19876/ (green) |
Member
Author
|
Landed in 76ecec2 |
addaleax
added a commit
that referenced
this pull request
Dec 31, 2018
2555cb4 introduced a crash when a non-number value was passed to `ParseArrayIndex()`. We do not always have JS typechecking for that in place, though. This returns back to the previous behavior of coercing values to integers, which is certainly questionable. Refs: #22129 Fixes: #23668 PR-URL: #25154 Reviewed-By: James M Snell <jasnell@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jan 1, 2019
2555cb4 introduced a crash when a non-number value was passed to `ParseArrayIndex()`. We do not always have JS typechecking for that in place, though. This returns back to the previous behavior of coercing values to integers, which is certainly questionable. Refs: #22129 Fixes: #23668 PR-URL: #25154 Reviewed-By: James M Snell <jasnell@gmail.com>
refack
pushed a commit
to refack/node
that referenced
this pull request
Jan 14, 2019
2555cb4 introduced a crash when a non-number value was passed to `ParseArrayIndex()`. We do not always have JS typechecking for that in place, though. This returns back to the previous behavior of coercing values to integers, which is certainly questionable. Refs: nodejs#22129 Fixes: nodejs#23668 PR-URL: nodejs#25154 Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a forward-port of v10.x’s #23795, which was originally targeting master, to fix #23668.
As part of the discussion back then, we wanted to explore a “fix” for v11.x and master that involved introducing typechecking along the lines of #23840, but since that hasn’t happened, it seems like a good idea to apply this on all affected branches, in order to make sure the bug is fixed everywhere.
This does not keep #23840 from happening in any way (except that this makes it a semver-major PR).
2555cb4 introduced a crash
when a non-number value was passed to
ParseArrayIndex().We do not always have JS typechecking for that in place, though.
This returns back to the previous behavior of coercing values
to integers, which is certainly questionable.
Refs: #22129
Fixes: #23668
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes