-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
crypto: fix return type prob reported by coverity #42135
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Review requested:
|
This is what was reported by Coverity
|
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 <mdawson@devrus.com>
7617134
to
0f0987a
Compare
Fixed lint issues and force pushed. |
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
.
Co-authored-by: Tobias Nießen <tniessen@tnie.de>
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. |
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 <mdawson@devrus.com> PR-URL: #42135 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
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 <mdawson@devrus.com> PR-URL: nodejs#42135 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Darshan Sen <raisinten@gmail.com>
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 mdawson@devrus.com