projects
/
BearSSL
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e37c90a
)
Fixed computation of product size.
author
Thomas Pornin
<pornin@bolet.org>
Tue, 31 Jul 2018 20:53:35 +0000
(22:53 +0200)
committer
Thomas Pornin
<pornin@bolet.org>
Tue, 31 Jul 2018 20:53:35 +0000
(22:53 +0200)
src/int/i15_mulacc.c
patch
|
blob
|
history
diff --git
a/src/int/i15_mulacc.c
b/src/int/i15_mulacc.c
index
69f4696
..
7a073ac
100644
(file)
--- a/
src/int/i15_mulacc.c
+++ b/
src/int/i15_mulacc.c
@@
-38,9
+38,9
@@
br_i15_mulacc(uint16_t *d, const uint16_t *a, const uint16_t *b)
* Announced bit length of d[] will be the sum of the announced
* bit lengths of a[] and b[]; but the lengths are encoded.
*/
- dl = (a[0] & 15) + (
d
[0] & 15);
+ dl = (a[0] & 15) + (
b
[0] & 15);
dh = (a[0] >> 4) + (b[0] >> 4);
- d[0] = (dh << 4) + dl + (~(uint
16_t)(dl - 15) >> 15
);
+ d[0] = (dh << 4) + dl + (~(uint
32_t)(dl - 15) >> 31
);
for (u = 0; u < blen; u ++) {
uint32_t f;