projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03b8981
)
Fix test failures when using enable-ubsan
author
Matt Caswell
<matt@openssl.org>
Thu, 2 Jun 2016 12:53:49 +0000
(13:53 +0100)
committer
Matt Caswell
<matt@openssl.org>
Thu, 2 Jun 2016 14:36:22 +0000
(15:36 +0100)
Numerous test failures were occuring when Configured with enable-ubsan
although they could all be traced back to one issue.
Reviewed-by: Andy Polyakov <appro@openssl.org>
crypto/bn/rsaz_exp.c
patch
|
blob
|
history
diff --git
a/crypto/bn/rsaz_exp.c
b/crypto/bn/rsaz_exp.c
index 3398cce9ab450f2a7663161367c3acce1d60af3f..1a70f6caded2eab20b0a0b4026556c23bf3b93a0 100644
(file)
--- a/
crypto/bn/rsaz_exp.c
+++ b/
crypto/bn/rsaz_exp.c
@@
-253,7
+253,7
@@
void RSAZ_1024_mod_exp_avx2(BN_ULONG result_norm[16],
rsaz_1024_sqr_avx2(result, result, m, k0, 5);
- wvalue =
*((unsigned short *)&p_str[index / 8])
;
+ wvalue =
(p_str[(index / 8) + 1] << 8) | p_str[index / 8]
;
wvalue = (wvalue >> (index % 8)) & 31;
index -= 5;