Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
crypto: fix return type prob reported by coverity#42135
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
nodejs-github-bot commented Feb 25, 2022
Review requested:
|
mhdawson commented Feb 25, 2022 • edited by RaisinTen
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by RaisinTen
Uh oh!
There was an error while loading. Please reload this page.
This is what was reported by Coverity |
mhdawson commented Feb 25, 2022
I don't know whey I don't get the linter errors when I run locally :( |
Coverity correctly reported that the value returned by BIO_get_mem_data could be negative and the type provided for the return value was unsigned. Fix up the type and check. Signed-off-by: Michael Dawson <[email protected]>
mhdawson commented Feb 25, 2022
Fixed lint issues and force pushed. |
tniessen left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, BIO_get_mem_data internally casts a size_t to long, so the result is guaranteed to be valid when cast to size_t.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Tobias Nießen <[email protected]>
nodejs-github-bot commented Feb 28, 2022
nodejs-github-bot commented Feb 28, 2022
nodejs-github-bot commented Feb 28, 2022
mhdawson commented Mar 1, 2022
The update to the checks on the issue seems to be stale. This CI run - https://ci.nodejs.org/job/node-test-pull-request/42821/ shows all green. Going to land. |
mhdawson commented Mar 1, 2022
Landed in a9c0689 |
Coverity correctly reported that the value returned by BIO_get_mem_data could be negative and the type provided for the return value was unsigned. Fix up the type and check. Signed-off-by: Michael Dawson <[email protected]> PR-URL: #42135 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
bengl commented Mar 21, 2022
This doesn't land on 17.x, and it looks like it's because it's modifying code added in a semver-major, so I'm adding the |
Coverity correctly reported that the value returned by BIO_get_mem_data could be negative and the type provided for the return value was unsigned. Fix up the type and check. Signed-off-by: Michael Dawson <[email protected]> PR-URL: nodejs#42135 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
juanarbol commented May 28, 2022
This depends on #42002 which is another semver major; so this can not be landed in V16.x |
Coverity correctly reported that the value returned
by BIO_get_mem_data could be negative and the type
provided for the return value was unsigned.
Fix up the type and check.
Signed-off-by: Michael Dawson [email protected]