-
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
Backport 2.16: add missing some error checks in ECP and bignum #3513
Backport 2.16: add missing some error checks in ECP and bignum #3513
Conversation
Run all the addition and subtraction tests with the result aliased to the first operand and with the result aliased to the second operand. Before, only some of the aliasing possibilities were tested, for only some of the functions, with only some inputs. Signed-off-by: Gilles Peskine <[email protected]>
Fix a memory leak in mbedtls_mpi_sub_abs when the output parameter is aliased to the second operand (X = A - X) and the result is negative. Signed-off-by: Gilles Peskine <[email protected]>
fix_negative allocates memory for its result. The calling site didn't check the return value, so an out-of-memory error could lead to an incorrect calculation. Fix this. Signed-off-by: Gilles Peskine <[email protected]>
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.
This looks all good improvements to me.
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.
LGTM
The CI only fails in (1) compat.sh in Travis which was fixed in the meantime by #3590 (2) armcc license issue, which is independent from this PR. |
I'm going to add a changelog entry, make the (trivial, I think) 2.7 backport, and rework #3512 to be standalone. |
e16655c
Signed-off-by: Gilles Peskine <[email protected]>
e16655c
to
3ce9480
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.
LGTM
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.
LGTM
Straightforward backport of #3942