buffer: standardize array index check#6084
Merged
trevnorris merged 1 commit intonodejs:masterfrom Apr 8, 2016
Merged
Conversation
e324a18 to
fdffa82
Compare
Member
|
LGTM |
ParseArrayIndex() was requesting a Uint32Value(), but assigning it to an in32_t. This caused slight differences in error message reported in edge cases of argument parsing. Fixed by getting the IntegerValue() before checking if the value is < 0. Added test of API that was affected. PR-URL: nodejs#6084 Reviewed-By: James M Snell <jasnell@gmail.com>
fdffa82 to
9d94cc5
Compare
Contributor
Author
|
Thanks much! Landed in 9d94cc5. |
MylesBorins
pushed a commit
that referenced
this pull request
Apr 19, 2016
ParseArrayIndex() was requesting a Uint32Value(), but assigning it to an in32_t. This caused slight differences in error message reported in edge cases of argument parsing. Fixed by getting the IntegerValue() before checking if the value is < 0. Added test of API that was affected. PR-URL: #6084 Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Apr 20, 2016
ParseArrayIndex() was requesting a Uint32Value(), but assigning it to an in32_t. This caused slight differences in error message reported in edge cases of argument parsing. Fixed by getting the IntegerValue() before checking if the value is < 0. Added test of API that was affected. PR-URL: #6084 Reviewed-By: James M Snell <jasnell@gmail.com>
Closed
MylesBorins
pushed a commit
that referenced
this pull request
Apr 20, 2016
ParseArrayIndex() was requesting a Uint32Value(), but assigning it to an in32_t. This caused slight differences in error message reported in edge cases of argument parsing. Fixed by getting the IntegerValue() before checking if the value is < 0. Added test of API that was affected. PR-URL: #6084 Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell
pushed a commit
that referenced
this pull request
Apr 26, 2016
ParseArrayIndex() was requesting a Uint32Value(), but assigning it to an in32_t. This caused slight differences in error message reported in edge cases of argument parsing. Fixed by getting the IntegerValue() before checking if the value is < 0. Added test of API that was affected. PR-URL: #6084 Reviewed-By: James M Snell <jasnell@gmail.com>
Contributor
|
@trevnorris there are some failing tests on v4.x-staging with this change. Here's the diff ++<<<<<<< 5faeb7ebf381445bc1a156669f983d6133659310
+ int32_t tmp_i = arg->Int32Value();
++=======
+ int64_t tmp_i = arg->IntegerValue();
++>>>>>>> buffer: standardize array index checkPerhaps the change isn't necessary since the assigned value and return match up on the v4.x stream |
Contributor
|
ping @trevnorris should this be backported? |
Contributor
Author
|
@thealphanerd I wouldn't consider this something that's necessary to backport. Especially since it implicitly relies on several other parts working in a specific way. |
Contributor
|
thanks for the heads up. moving it to don't land. |
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.
Checklist
Affected core subsystem(s)
buffer
Description of change
ParseArrayIndex() was requesting a Uint32Value(), but assigning it to an
in32_t. This caused slight differences in error message reported in edge
cases of argument parsing. Fixed by getting the IntegerValue() before
checking if the value is < 0. Added test of API that was affected.
R=@bnoordhuis
R=@jasnell
CI: https://ci.nodejs.org/job/node-test-pull-request/2179/