]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm stats dump: Fix potentially not writing all stats output
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 11 Sep 2018 12:54:39 +0000 (15:54 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Thu, 20 Sep 2018 08:45:46 +0000 (11:45 +0300)
It depended on whether uninitialized stack memory was 0 or not.

src/doveadm/doveadm-stats.c

index 53c89562e0e58e84dfee5a54b1093f2c0ac4c6be..b6bb4fff4b1f05930837964b2479693b604c1115 100644 (file)
@@ -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) {