aboutsummaryrefslogtreecommitdiffstats
path: root/src/spf.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/spf.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/spf.c')
-rw-r--r--src/spf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/spf.c b/src/spf.c
index fcfdbd05c..fcbefeab2 100644
--- a/src/spf.c
+++ b/src/spf.c
@@ -206,7 +206,7 @@ parse_spf_hostmask (struct worker_task *task, const gchar *begin, struct spf_add
p = strchr (begin, '/');
if (p != NULL) {
/* Extract mask */
- g_strlcpy (mask_buf, p + 1, sizeof (mask_buf));
+ rspamd_strlcpy (mask_buf, p + 1, sizeof (mask_buf));
addr->mask = mask_buf[0] * 10 + mask_buf[1];
if (addr->mask > 32) {
return FALSE;
@@ -214,7 +214,7 @@ parse_spf_hostmask (struct worker_task *task, const gchar *begin, struct spf_add
if (host == NULL) {
hostlen = p - begin;
host = memory_pool_alloc (task->task_pool, hostlen);
- g_strlcpy (host, begin, hostlen);
+ rspamd_strlcpy (host, begin, hostlen);
}
}
else {