From 3eee70998acdf203fbab99627cba3fac94f604e0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 4 Aug 2011 20:43:06 +0400 Subject: [PATCH] Another bad read detected. --- src/protocol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/protocol.c b/src/protocol.c index 4e15a47d84..175dbbdbb0 100644 --- a/src/protocol.c +++ b/src/protocol.c @@ -1195,16 +1195,18 @@ show_metric_result (gpointer metric_name, gpointer metric_value, void *user_data } } } + if (cd->alive) { #ifdef HAVE_CLOCK_GETTIME - cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, + cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset, "]), len: %z, time: %s, dns req: %d,", task->msg->len, calculate_check_time (&task->tv, &task->ts, task->cfg->clock_res), task->dns_requests); #else - cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset, + cd->log_offset += rspamd_snprintf (cd->log_buf + cd->log_offset, cd->log_size - cd->log_offset, "]), len: %z, time: %s, dns req: %d,", task->msg->len, calculate_check_time (&task->tv, task->cfg->clock_res), task->dns_requests); #endif + } } static gboolean -- 2.47.3