summaryrefslogtreecommitdiffstats
path: root/src/libserver/re_cache.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2022-01-05 13:51:30 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2022-01-05 13:51:30 +0000
commitb689a807525232e6f0596d9360cb575e870300c2 (patch)
tree8dcaaa3d88af18d19b63001cd769dd24c1d8cc37 /src/libserver/re_cache.c
parent7b7813c46b74dae41901b74af7f3ca3830d1f285 (diff)
downloadrspamd-b689a807525232e6f0596d9360cb575e870300c2.tar.gz
rspamd-b689a807525232e6f0596d9360cb575e870300c2.zip
[Minor] Use memcpy instead of unaligned access
Diffstat (limited to 'src/libserver/re_cache.c')
-rw-r--r--src/libserver/re_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c
index cde2e88a4..64f5f7a40 100644
--- a/src/libserver/re_cache.c
+++ b/src/libserver/re_cache.c
@@ -2391,7 +2391,7 @@ rspamd_re_cache_is_valid_hyperscan_file (struct rspamd_re_cache *cache,
p = map + RSPAMD_HS_MAGIC_LEN + sizeof (test_plt);
end = map + len;
- n = *(gint *)p;
+ memcpy(&n, p, sizeof(n));
p += sizeof (gint);
if (n <= 0 || 2 * n * sizeof (gint) + /* IDs + flags */