summaryrefslogtreecommitdiff
path: root/src/crypto/fipsmodule/bn/rsaz_exp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/fipsmodule/bn/rsaz_exp.c')
-rw-r--r--src/crypto/fipsmodule/bn/rsaz_exp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/crypto/fipsmodule/bn/rsaz_exp.c b/src/crypto/fipsmodule/bn/rsaz_exp.c
index d0090a66..cb9a233e 100644
--- a/src/crypto/fipsmodule/bn/rsaz_exp.c
+++ b/src/crypto/fipsmodule/bn/rsaz_exp.c
@@ -227,7 +227,9 @@ void RSAZ_1024_mod_exp_avx2(BN_ULONG result_norm[16],
rsaz_1024_sqr_avx2(result, result, m, k0, 5);
- wvalue = *((const unsigned short*)&p_str[index / 8]);
+ uint16_t wvalue_16;
+ memcpy(&wvalue_16, &p_str[index / 8], sizeof(wvalue_16));
+ wvalue = wvalue_16;
wvalue = (wvalue>> (index%8)) & 31;
index-=5;