From 3ebceeece2204d3755df1f1cc8210f7e97b6daad Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 16 Nov 2010 22:00:29 +0300 Subject: Make own strlcpy that does not calculate remaining string length (faster and more safe) Allow only ASCII symbols in logs, escape control chars --- src/smtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/smtp.c') 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); -- cgit v1.2.3