From: Vsevolod Stakhov Date: Thu, 4 Aug 2011 16:43:06 +0000 (+0400) Subject: Another bad read detected. X-Git-Tag: 0.4.2~3 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3eee70998acdf203fbab99627cba3fac94f604e0;p=rspamd.git Another bad read detected. --- diff --git a/src/protocol.c b/src/protocol.c index 4e15a47d8..175dbbdbb 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