From: Marek Schimara Date: Tue, 14 Jun 2016 14:04:09 +0000 (+0200) Subject: src/rrd_tune.c: fix Coverity CID#32430 Uninitialized pointer read X-Git-Tag: v1.7.0~42^2~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2bc0516cf71acd04184e10e94f67a9e531c224e9;p=thirdparty%2Frrdtool-1.x.git src/rrd_tune.c: fix Coverity CID#32430 Uninitialized pointer read CWE-457 / https://cwe.mitre.org/data/definitions/457.html --- diff --git a/src/rrd_tune.c b/src/rrd_tune.c index a9f05ba9..47163c28 100644 --- a/src/rrd_tune.c +++ b/src/rrd_tune.c @@ -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 */