aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-14 11:50:31 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-03-14 11:50:31 +0000
commite68b100c8894494ed578ad4d5519e08bc6b15299 (patch)
tree30e6531d2efce816275599715ccea37b517724d7 /src/libutil
parent340c24e31f760e3ca38d2dcfb8a73b3ba2a8aad7 (diff)
downloadrspamd-e68b100c8894494ed578ad4d5519e08bc6b15299.tar.gz
rspamd-e68b100c8894494ed578ad4d5519e08bc6b15299.zip
[Fix] Fix another memory issue with lua maps
Issue: #550 Reported by: @moisseev
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c
index ee84f4b41..d396e642a 100644
--- a/src/libutil/map.c
+++ b/src/libutil/map.c
@@ -939,7 +939,7 @@ rspamd_map_add (struct rspamd_config *cfg,
rspamd_cryptobox_hash (cksum, new_map->uri, strlen (new_map->uri), NULL, 0);
cksum_encoded = rspamd_encode_base32 (cksum, sizeof (cksum));
new_map->pool = rspamd_mempool_new (rspamd_mempool_suggest_size (), "map");
- memcpy (new_map->pool->tag.uid, cksum_encoded,
+ rspamd_strlcpy (new_map->pool->tag.uid, cksum_encoded,
sizeof (new_map->pool->tag.uid));
g_free (cksum_encoded);
pool = new_map->pool;