From ed34d4ce6fa0be000904bb85d0d17c47bb8d15aa Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 24 May 2024 11:04:34 +0200 Subject: [PATCH] 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. --- pdns/dnsdistdist/dnscrypt.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; }; -- 2.47.2