aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcryptobox
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-12 18:35:59 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-08-12 18:35:59 +0100
commit80cb19900c3ab36faf92060ea639bccdcda5eaa9 (patch)
tree8158c05411a9ff538535ee50b47454214a644170 /src/libcryptobox
parent74b182e0166abe108a374495079c2e23cdaceac6 (diff)
downloadrspamd-80cb19900c3ab36faf92060ea639bccdcda5eaa9.tar.gz
rspamd-80cb19900c3ab36faf92060ea639bccdcda5eaa9.zip
[Minor] Fix some ubsan related issues
Diffstat (limited to 'src/libcryptobox')
-rw-r--r--src/libcryptobox/base64/ref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcryptobox/base64/ref.c b/src/libcryptobox/base64/ref.c
index 6d3c295f1..541e4e929 100644
--- a/src/libcryptobox/base64/ref.c
+++ b/src/libcryptobox/base64/ref.c
@@ -34,7 +34,7 @@ extern const uint8_t base64_table_dec[256];
#define INNER_LOOP_64 do { \
while (inlen >= 13) { \
uint64_t str, res, dec; \
- str = *(uint64_t *)c; \
+ memcpy(&str, c, sizeof(str)); \
str = GUINT64_TO_BE(str); \
if ((dec = base64_table_dec[str >> 56]) > 63) { \
break; \
@@ -80,7 +80,7 @@ extern const uint8_t base64_table_dec[256];
#define INNER_LOOP_32 do { \
while (inlen >= 8) { \
uint32_t str, res, dec; \
- str = *(uint32_t *)c; \
+ memcpy(&str, c, sizeof(str)); \
str = GUINT32_TO_BE(str); \
if ((dec = base64_table_dec[str >> 24]) > 63) { \
break; \