diff options
author | Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> | 2019-10-21 14:41:01 +0300 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2019-10-23 12:16:13 +0300 |
commit | 85728d08ae00f9b9305bee442988eb7d56ff1304 (patch) | |
tree | 0979fc14bfaf318bcab21a66835f57bd5e1eb5d8 /.travis.yml | |
parent | 77f945bc9831862be7fdb35b438d494d054878c5 (diff) |
Update control logic for BN_gcd
PR https://github.com/openssl/openssl/pull/10122 introduced changes to
the BN_gcd function and the control logic inside it accessed `g->d[0]`
irrespective of `g->top`.
When BN_add is called, in case the result is zero, `BN_zero` is called.
The latter behaves differently depending on the API compatibility level
flag: normally `g->d[0]` is cleared but in `no-deprecated` builds only
`g->top` is set to zero.
This commit uses bitwise logic to ensure that `g` is treated as zero if
`g->top` is zero, irrespective of `g->d[0]`.
Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com>
(cherry picked from commit 8aca4bfe8213402c80abc06fe25121461f79128d)
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10232)
Diffstat (limited to '.travis.yml')
0 files changed, 0 insertions, 0 deletions