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/plugins/custom/regmark/regmark.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/plugins/custom/regmark/regmark.c')
-rw-r--r-- | src/plugins/custom/regmark/regmark.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/custom/regmark/regmark.c b/src/plugins/custom/regmark/regmark.c index b28c07183..3b0e50903 100644 --- a/src/plugins/custom/regmark/regmark.c +++ b/src/plugins/custom/regmark/regmark.c @@ -141,7 +141,7 @@ parse_line (const char *line, size_t len, char **output, void *user_data) while (p - line <= len) { if (g_ascii_isspace (*p) || p - line == len) { name = g_malloc (p - line + 1); - g_strlcpy (name, line, p - line + 1); + rspamd_strlcpy (name, line, p - line + 1); if (metaphone (name, 0, &metaname)) { /* Skip spaces */ while (p - line <= len && g_ascii_isspace (*p)) { |