summaryrefslogtreecommitdiffstats
path: root/src/binlog.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/binlog.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/binlog.c')
-rw-r--r--src/binlog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/binlog.c b/src/binlog.c
index 955ddc68a..76cfa0cca 100644
--- a/src/binlog.c
+++ b/src/binlog.c
@@ -167,8 +167,8 @@ binlog_open (memory_pool_t *pool, const gchar *path, time_t rotate_time, gint ro
}
new->filename = memory_pool_alloc (pool, len + sizeof (BINLOG_SUFFIX));
- g_strlcpy (new->filename, path, len + 1);
- g_strlcpy (new->filename + len, BINLOG_SUFFIX, sizeof (BINLOG_SUFFIX));
+ rspamd_strlcpy (new->filename, path, len + 1);
+ rspamd_strlcpy (new->filename + len, BINLOG_SUFFIX, sizeof (BINLOG_SUFFIX));
if (stat (new->filename, &st) == -1) {
/* Check errno to check whether we should create this file */