diff options
author | Andy Polyakov <appro@openssl.org> | 2018-03-02 17:25:31 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2018-03-03 22:02:22 +0100 |
commit | 3ccbc5fff7904b2ac0858fb64fd3978e97fd2924 (patch) | |
tree | 62b39a4f374056c6a4c516cadb07405be36c0e86 /crypto/ec/curve448 | |
parent | 55a7f77d72930f9aee1a51e0af9658b2728be127 (diff) |
ec/curve448/curve448.c: fix undefined behaviour sanitizer failure.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5494)
Diffstat (limited to 'crypto/ec/curve448')
-rw-r--r-- | crypto/ec/curve448/curve448.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/ec/curve448/curve448.c b/crypto/ec/curve448/curve448.c index 8ced622b7b..7dc68c8853 100644 --- a/crypto/ec/curve448/curve448.c +++ b/crypto/ec/curve448/curve448.c @@ -579,7 +579,7 @@ static int recode_wnaf(struct smvt_control *control, assert(position >= 0); if (odd & (1 << (table_bits + 1))) delta -= (1 << (table_bits + 1)); - current -= delta << pos; + current -= delta * (1 << pos); control[position].power = pos + 16 * (w - 1); control[position].addend = delta; position--; |