-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Expose SSL HW record acceleration error. #3310
Expose SSL HW record acceleration error. #3310
Conversation
Fix issue with variable shadowing. Signed-off-by: sander-visser <github@visser.se>
Hi @sander-visser and thanks for your contribution! Could you please give use more details about the issue this PR is fixing and how you found it:
|
The issue is real as far as I have understood. Only the ret local to "if( mbedtls_ssl_hw_record_init != NULL )" would have seen the error and the shadowed ret that is returned from "end:" would still have been 0. Im not a user of MBEDTLS_SSL_HW_RECORD_ACCEL. I just reacted to issue reported in Cppcheck 1.89 (I scanned the codebase since Im looking into optee that uses it (older version)). |
Oh, interesting, thanks for the information. Last I tried cppcheck it didn't find anything interesting… But it does have the advantage that it explores different compile-time configurations, whereas almost every other static analysis tool work on the preprocessor output. We should run it in our CI. |
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.
Looks good to me. But please add a signoff line to the second commit.
Signed-off-by: sander-visser <github@visser.se>
77e20d5
to
a65fe0b
Compare
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.
Thanks for adding a ChangeLog entry. Looks good to me.
I just checked that the issue was introduced in a refactoring that happened after 2.16, so it's not present in any of the LTS branches and doesn't need backporting. |
* development: (81 commits) Add changelog entry file Remove obsolete comment Changelog entry noting the behavior change and storage format change Update SE support to pass a location when registering a driver Update SE support to pass a location when registering a driver Update the SE interface to pass a location when registering a driver Fix macros Missing word Define a macro to construct a lifetime from persistence and location Document PSA_KEY_PERSISTENCE_xxx and PSA_KEY_LOCATION_xxx Rename and clarify the default persistent location and persistence PSA_KEY_LIFETIME_PERSISTENT is a lifetime, not just a storage area Shorten type and value names for lifetime parts Define some structure for lifetime values Fix typo in program benchmark. Add changelog entry for #3310. Add variable initialization to large SSL TLS function. Add Changelog entry for #3312 Scope reduction to enable NULL check to protect dereferencing. Expose SSL HW record acceleration error. ...
Fix issue with variable shadowing.
Signed-off-by: sander-visser github@visser.se
Status
READY
Requires Backporting
NO
Migrations
If there is any API change, what's the incentive and logic for it.
YES | NO
Additional comments
Any additional information that could be of interest
Todos
Steps to test or reproduce
Outline the steps to test or reproduce the PR here.