Browse Source

[Fix] Fix logging buffer corruption in case of repeated messages

tags/1.7.0
Vsevolod Stakhov 6 years ago
parent
commit
75e699c0b2
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/libutil/logger.c

+ 3
- 1
src/libutil/logger.c View File

@@ -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,

Loading…
Cancel
Save