projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
ec/curve448/curve448.c: fix undefined behaviour sanitizer failure.
[openssl.git]
/
crypto
/
ec
/
curve448
/
curve448.c
diff --git
a/crypto/ec/curve448/curve448.c
b/crypto/ec/curve448/curve448.c
index 8ced622b7b4250c39a2a02a38dd8e8c0ab25090d..7dc68c8853e1df7cc56216a71f1364b4164127f6 100644
(file)
--- 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--;