]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
src/rrd_tune.c: fix Coverity CID#32430 Uninitialized pointer read
authorMarek Schimara <Marek.Schimara@bull.net>
Tue, 14 Jun 2016 14:04:09 +0000 (16:04 +0200)
committerMarek Schimara <Marek.Schimara@bull.net>
Thu, 23 Jun 2016 14:32:32 +0000 (16:32 +0200)
        CWE-457 / https://cwe.mitre.org/data/definitions/457.html

src/rrd_tune.c

index a9f05ba947cbbe6a36645c05a4fcc5b50784b05f..47163c286915b557256d57e439a1a19bc0a13ca4 100644 (file)
@@ -116,6 +116,9 @@ int rrd_tune(
     struct optparse options;
     int opt;
 
+    /* Fix CWE-457 */
+    memset(&rrd, 0, sizeof(rrd_t));
+
     /* before we open the input RRD, we should flush it from any caching
     daemon, because we might totally rewrite it later on */