]> git.itanic.dy.fi Git - rrdd/commitdiff
do_rrdtool_update_data: Initialize data buffer
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 9 Jul 2016 10:22:28 +0000 (13:22 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 9 Jul 2016 10:22:28 +0000 (13:22 +0300)
Make sure the data buffer is zeroed completely before use. This
silences a walgrind warning of uninitialzed data usage.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
rrdtool.c

index e7eedc7603927ebc8aa364844ff1184222b76b5c..43b3571da5fcfbd7e2d23ad6726f77f20eb15914 100644 (file)
--- a/rrdtool.c
+++ b/rrdtool.c
@@ -264,6 +264,7 @@ static int do_rrdtool_update_data(struct rrd_database *rrd)
        };
        int l;
 
        };
        int l;
 
+       bzero(data, sizeof(data));
        l = sprintf(data, "N:");
 
        if (rrd->parser && rrd->parser->parse) {
        l = sprintf(data, "N:");
 
        if (rrd->parser && rrd->parser->parse) {