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/statfile.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/statfile.c')
-rw-r--r-- | src/statfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/statfile.c b/src/statfile.c index b26664fd5..cf8d12e3f 100644 --- a/src/statfile.c +++ b/src/statfile.c @@ -342,7 +342,7 @@ statfile_pool_open (statfile_pool_t * pool, gchar *filename, size_t size, gboole } - g_strlcpy (new_file->filename, filename, sizeof (new_file->filename)); + rspamd_strlcpy (new_file->filename, filename, sizeof (new_file->filename)); new_file->len = st.st_size; /* Aqquire lock for this operation */ lock_file (new_file->fd, FALSE); @@ -633,7 +633,7 @@ stat_file_t * statfile_pool_is_open (statfile_pool_t * pool, gchar *filename) { static stat_file_t f, *ret; - g_strlcpy (f.filename, filename, sizeof (f.filename)); + rspamd_strlcpy (f.filename, filename, sizeof (f.filename)); ret = lfind (&f, pool->files, (size_t *)&pool->opened, sizeof (stat_file_t), cmpstatfile); return ret; } |