From: Chris Hofstaedtler Date: Sat, 12 Aug 2023 13:31:44 +0000 (+0200) Subject: Auth: always initialize id passed to dk.addKey X-Git-Tag: rec-5.0.0-alpha1~24^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62a46a7990f4dd0d0003f5b6c7c0e8fae841334b;p=thirdparty%2Fpdns.git Auth: always initialize id passed to dk.addKey --- diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index bdf0d3347b..52ea3bd029 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -2265,7 +2265,7 @@ static bool showZone(DNSSECKeeper& dk, const DNSName& zone, bool exportDS = fals static bool secureZone(DNSSECKeeper& dk, const DNSName& zone) { // temp var for addKey - int64_t id; + int64_t id{-1}; // parse attribute string k_algo = ::arg()["default-ksk-algorithm"]; @@ -3068,7 +3068,7 @@ try return EXIT_FAILURE; } } - int64_t id; + int64_t id{-1}; if (!dk.addKey(zone, keyOrZone, algorithm, id, bits, active, published)) { cerr<<"Adding key failed, perhaps DNSSEC not enabled in configuration?"<