-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
crypto: fix incorrect use of INT_MAX in validation #22581
Closed
tniessen
wants to merge
1
commit into
nodejs:master
from
tniessen:crypto-fix-incorrect-use-of-intmax
Closed
crypto: fix incorrect use of INT_MAX in validation #22581
tniessen
wants to merge
1
commit into
nodejs:master
from
tniessen:crypto-fix-incorrect-use-of-intmax
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
The native crypto module doesn't export INT_MAX, so all occurrences in the JavaScript layer evaluated to undefined. This change removes all such occurrences and replaces validateInt32 with validateUint32 since the native layer assumes uint32_t anyway. The alternative would be to use the constant from the constants module, but that would be pointless as far as I can tell.
nodejs-github-bot
added
the
crypto
Issues and PRs related to the crypto subsystem.
label
Aug 29, 2018
cc @nodejs/crypto |
BridgeAR
approved these changes
Aug 31, 2018
BridgeAR
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Aug 31, 2018
addaleax
approved these changes
Sep 2, 2018
Landed in 761bbfb |
addaleax
pushed a commit
that referenced
this pull request
Sep 2, 2018
The native crypto module doesn't export INT_MAX, so all occurrences in the JavaScript layer evaluated to undefined. This change removes all such occurrences and replaces validateInt32 with validateUint32 since the native layer assumes uint32_t anyway. The alternative would be to use the constant from the constants module, but that would be pointless as far as I can tell. PR-URL: #22581 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos
pushed a commit
that referenced
this pull request
Sep 2, 2018
The native crypto module doesn't export INT_MAX, so all occurrences in the JavaScript layer evaluated to undefined. This change removes all such occurrences and replaces validateInt32 with validateUint32 since the native layer assumes uint32_t anyway. The alternative would be to use the constant from the constants module, but that would be pointless as far as I can tell. PR-URL: #22581 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos
pushed a commit
that referenced
this pull request
Sep 3, 2018
The native crypto module doesn't export INT_MAX, so all occurrences in the JavaScript layer evaluated to undefined. This change removes all such occurrences and replaces validateInt32 with validateUint32 since the native layer assumes uint32_t anyway. The alternative would be to use the constant from the constants module, but that would be pointless as far as I can tell. PR-URL: #22581 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
targos
pushed a commit
that referenced
this pull request
Sep 6, 2018
The native crypto module doesn't export INT_MAX, so all occurrences in the JavaScript layer evaluated to undefined. This change removes all such occurrences and replaces validateInt32 with validateUint32 since the native layer assumes uint32_t anyway. The alternative would be to use the constant from the constants module, but that would be pointless as far as I can tell. PR-URL: #22581 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This was referenced Sep 6, 2018
tniessen
removed
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Sep 12, 2018
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.
The native crypto module doesn't export
INT_MAX
, so all occurrences in the JavaScript layer evaluated toundefined
. This change removes all such occurrences and replacesvalidateInt32
withvalidateUint32
since the native layer assumesuint32_t
anyway.The alternative would be to use the constant from the
constants
module, but that would be pointless as far as I can tell. If someone sees a reason to keep usingINT_MAX
here, I will gladly change it.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes