diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-11-16 22:00:29 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-11-16 22:00:29 +0300 |
commit | 3ebceeece2204d3755df1f1cc8210f7e97b6daad (patch) | |
tree | 38c122341dbbb2f1ea1a4c969ad95dda38c1106e /src/smtp.c | |
parent | c85dd608a568d61e3b24c55b715ad37ceedb7110 (diff) | |
download | rspamd-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/smtp.c')
-rw-r--r-- | src/smtp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/smtp.c b/src/smtp.c index f2d2e790a..859a83917 100644 --- a/src/smtp.c +++ b/src/smtp.c @@ -300,7 +300,7 @@ process_smtp_data (struct smtp_session *session) if (cur) { f = cur->data; s = memory_pool_alloc (session->pool, f->len + 1); - g_strlcpy (s, f->begin, f->len + 1); + rspamd_strlcpy (s, f->begin, f->len + 1); session->task->from = s; } /* Save recipients */ @@ -310,7 +310,7 @@ process_smtp_data (struct smtp_session *session) if (cur) { f = cur->data; s = memory_pool_alloc (session->pool, f->len + 1); - g_strlcpy (s, f->begin, f->len + 1); + rspamd_strlcpy (s, f->begin, f->len + 1); session->task->rcpt = g_list_prepend (session->task->rcpt, s); } t = g_list_next (t); |