crypto: fix return type prob reported by coverity#42135
crypto: fix return type prob reported by coverity#42135mhdawson wants to merge 3 commits intonodejs:masterfrom
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 <[email protected]>
7617134 to
0f0987a
Compare
|
Fixed lint issues and force pushed. |
tniessen
left a comment
There was a problem hiding this comment.
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 <[email protected]>
|
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 <[email protected]> PR-URL: #42135 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Darshan Sen <[email protected]>
|
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]>
|
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]