summaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-02-27 11:04:24 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-02-27 11:04:24 +0000
commit75e699c0b2fe1e1eabe8c4aa90957d8cb1ed1ae0 (patch)
tree1ff30b0b7311d121021e176ca707edba28e963c1 /src/libutil
parenteb5c6dcd495a2edff6f0da4baf40eff59c2f460d (diff)
downloadrspamd-75e699c0b2fe1e1eabe8c4aa90957d8cb1ed1ae0.tar.gz
rspamd-75e699c0b2fe1e1eabe8c4aa90957d8cb1ed1ae0.zip
[Fix] Fix logging buffer corruption in case of repeated messages
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/logger.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libutil/logger.c b/src/libutil/logger.c
index 4d28e28fd..629ae8a12 100644
--- a/src/libutil/logger.c
+++ b/src/libutil/logger.c
@@ -863,7 +863,8 @@ file_log_function (const gchar *module, const gchar *id,
const gchar *message,
gpointer arg)
{
- static gchar tmpbuf[256], timebuf[64], modulebuf[64];
+ static gchar timebuf[64], modulebuf[64];
+ gchar tmpbuf[256];
gchar *m;
gdouble now;
struct tm tms;
@@ -967,6 +968,7 @@ file_log_function (const gchar *module, const gchar *id,
"Last message repeated %ud times",
rspamd_log->repeats);
rspamd_log->repeats = 0;
+
if (rspamd_log->saved_message) {
file_log_function (rspamd_log->saved_module,
rspamd_log->saved_id,