-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
buffer: fix crash for invalid index types #25154
Closed
Closed
Conversation
This file contains 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
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
addaleax
added
buffer
Issues and PRs related to the buffer subsystem.
dont-land-on-v8.x
labels
Dec 20, 2018
nodejs-github-bot
added
the
c++
Issues and PRs that require attention from people who are familiar with C++.
label
Dec 20, 2018
jasnell
approved these changes
Dec 20, 2018
addaleax
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Dec 26, 2018
Resume CI: https://ci.nodejs.org/job/node-test-pull-request/19876/ (green) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
buffer
Issues and PRs related to the buffer subsystem.
c++
Issues and PRs that require attention from people who are familiar with C++.
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