From: Remi Gacogne Date: Fri, 24 May 2024 09:04:34 +0000 (+0200) Subject: dnsdist: Initialize DNSCrypt structures X-Git-Tag: rec-5.2.0-alpha0~36^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F14235%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Initialize DNSCrypt structures These are always properly initialized later in the code but Coverity is not convinced, and it's good practice to initialize them anyway. --- diff --git a/pdns/dnsdistdist/dnscrypt.hh b/pdns/dnsdistdist/dnscrypt.hh index dfb4c9bf81..ff5e40bbdf 100644 --- a/pdns/dnsdistdist/dnscrypt.hh +++ b/pdns/dnsdistdist/dnscrypt.hh @@ -115,8 +115,8 @@ struct DNSCryptCertSignedData using ResolverPublicKeyType = std::array; using ResolverPrivateKeyType = std::array; using ClientMagicType = std::array; - ResolverPublicKeyType resolverPK; - ClientMagicType clientMagic; + ResolverPublicKeyType resolverPK{}; + ClientMagicType clientMagic{}; uint32_t serial{0}; uint32_t tsStart{0}; uint32_t tsEnd{0}; @@ -148,10 +148,10 @@ public: using ESVersionType = std::array; using ProtocolMinorVersionType = std::array; using CertMagicType = std::array; - CertMagicType magic; - ESVersionType esVersion; - ProtocolMinorVersionType protocolMinorVersion; - std::array signature; + CertMagicType magic{}; + ESVersionType esVersion{}; + ProtocolMinorVersionType protocolMinorVersion{}; + std::array signature{}; DNSCryptCertSignedData signedData; };