From: Timo Sirainen Date: Tue, 11 Sep 2018 12:54:39 +0000 (+0300) Subject: doveadm stats dump: Fix potentially not writing all stats output X-Git-Tag: 2.3.9~1399 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=023d50f1a1ba2c33f7c39d4f83ace92caf9b4dad;p=thirdparty%2Fdovecot%2Fcore.git doveadm stats dump: Fix potentially not writing all stats output It depended on whether uninitialized stack memory was 0 or not. --- diff --git a/src/doveadm/doveadm-stats.c b/src/doveadm/doveadm-stats.c index 53c89562e0..b6bb4fff4b 100644 --- a/src/doveadm/doveadm-stats.c +++ b/src/doveadm/doveadm-stats.c @@ -58,7 +58,7 @@ static void stats_dump(const char *path, const char *const *fields, bool reset) net_set_nonblock(fd, FALSE); str_append(cmd, "VERSION\tstats-reader-client\t2\t0\n"); str_append(cmd, reset ? "DUMP-RESET" : "DUMP"); - i_zero(field_types); + i_zero(&field_types); for (i = 0; i < fields_count; i++) { str_append_c(cmd, '\t'); if (strcmp(fields[i], "stddev") == 0) {