From: Andy Polyakov Date: Fri, 2 Mar 2018 16:25:31 +0000 (+0100) Subject: ec/curve448/curve448.c: fix undefined behaviour sanitizer failure. X-Git-Tag: OpenSSL_1_1_1-pre3~197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3ccbc5fff7904b2ac0858fb64fd3978e97fd2924;p=openssl ec/curve448/curve448.c: fix undefined behaviour sanitizer failure. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/5494) --- 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--;