-
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
Fix uninitialized variable in x509_crt (#2392 resubmit) #2795
Conversation
This is resubmit of #2392, implementing following change request there (#2392 (review)):
Comparing to the original patch, only changes to the @hanno-arm, @mpg, @RonEld (reviewers of #2392), could you please have a look? |
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.
I checked that the code changes are identical to those in #2392 which I previously approved.
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.
I went through discussion in the original PR and through the changes. The code looks good.
@pfalcon Thanks for opening this new PR. Could you check if the warning also happens in our LTS branches (currently mbedtls-2.16 and mbedtls-2.7)? If it does, we'll need PRs backporting the fixes to those branches as well. Thanks! |
This patch fixes an issue we encountered with more stringent compiler warnings. The signature_is_good variable has a possibility of being used uninitialized. This patch moves the use of the variable to a place where it cannot be used while uninitialized. Signed-off-by: Andy Gross <andy.gross@linaro.org>
1032ae7
to
1f62714
Compare
@mpg, @k-stachowiak: Thanks for the review!
This does happen in 2.16, that's actually which version it was originally prepared for. I submitted #2813 for that, the only change is moving ChangeLog entry to the appropriate section. While doing so, it occurred to me that this PR contained ChangeLog entry in an old section (circa 2.16.0), so I moved to the next-version section here (while rebasing on the latest This patch doesn't apply to 2.7 - the code considerably different there. |
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 updating! Still looks good to me.
This has two approving review, passes CI, and so does the only relevant backport, so labeling "ready for merge". |
This patch fixes an issue we encountered with more stringent compiler
warnings. The signature_is_good variable has a possibility of being
used uninitialized. This patch moves the use of the variable to a
place where it cannot be used while uninitialized.
Signed-off-by: Andy Gross andy.gross@linaro.org
Backport status: this has been backported to 2.16 in #2813 and is not applicable to 2.7.
Notes:
or for companies or those that do not wish to create an mbed account, a slightly different agreement can be found here
Description
A few sentences describing the overall goals of the pull request's commits.
Status
READY/IN DEVELOPMENT/HOLD
Requires Backporting
When there is a bug fix, it should be backported to all maintained and supported branches.
Changes do not have to be backported if:
Yes | NO
Which branch?
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.