diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-14 11:50:31 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-03-14 11:50:31 +0000 |
commit | e68b100c8894494ed578ad4d5519e08bc6b15299 (patch) | |
tree | 30e6531d2efce816275599715ccea37b517724d7 /src/libutil | |
parent | 340c24e31f760e3ca38d2dcfb8a73b3ba2a8aad7 (diff) | |
download | rspamd-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.c | 2 |
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; |