From 3ccbc5fff7904b2ac0858fb64fd3978e97fd2924 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Fri, 2 Mar 2018 17:25:31 +0100 Subject: [PATCH] ec/curve448/curve448.c: fix undefined behaviour sanitizer failure. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5494) --- crypto/ec/curve448/curve448.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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--; -- 2.25.1