summaryrefslogtreecommitdiffstats
path: root/src/fuzzy_storage.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-11-16 22:00:29 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-11-16 22:00:29 +0300
commit3ebceeece2204d3755df1f1cc8210f7e97b6daad (patch)
tree38c122341dbbb2f1ea1a4c969ad95dda38c1106e /src/fuzzy_storage.c
parentc85dd608a568d61e3b24c55b715ad37ceedb7110 (diff)
downloadrspamd-3ebceeece2204d3755df1f1cc8210f7e97b6daad.tar.gz
rspamd-3ebceeece2204d3755df1f1cc8210f7e97b6daad.zip
Make own strlcpy that does not calculate remaining string length (faster and more safe)
Allow only ASCII symbols in logs, escape control chars
Diffstat (limited to 'src/fuzzy_storage.c')
-rw-r--r--src/fuzzy_storage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fuzzy_storage.c b/src/fuzzy_storage.c
index 1bbe0dd3c..dc18a694d 100644
--- a/src/fuzzy_storage.c
+++ b/src/fuzzy_storage.c
@@ -172,10 +172,10 @@ sync_cache (struct rspamd_worker *wrk)
node = *((struct rspamd_fuzzy_node **)pvalue);
if (now - node->time > expire) {
/* Remove expired item */
- g_strlcpy (tmpindex, indexbuf, sizeof (tmpindex));
+ rspamd_strlcpy (tmpindex, indexbuf, sizeof (tmpindex));
pvalue = JudySLNext (jtree, tmpindex, PJE0);
JudySLDel (&jtree, indexbuf, PJE0);
- g_strlcpy (indexbuf, tmpindex, sizeof (indexbuf));
+ rspamd_strlcpy (indexbuf, tmpindex, sizeof (indexbuf));
bloom_del (bf, node->h.hash_pipe);
server_stat->fuzzy_hashes_expired ++;
server_stat->fuzzy_hashes --;