From d056f24c52ee1d4a136e7a7888e5629a71290e21 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 3 Aug 2020 18:57:16 +0200 Subject: Core/Crypto: Initialize class member variables after crypto refactor --- src/common/Cryptography/CryptoHash.h | 2 +- src/common/Cryptography/HMAC.h | 2 +- src/common/Cryptography/SessionKeyGenerator.h | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/common/Cryptography/CryptoHash.h b/src/common/Cryptography/CryptoHash.h index 8c9825ce2d8..56af9740c04 100644 --- a/src/common/Cryptography/CryptoHash.h +++ b/src/common/Cryptography/CryptoHash.h @@ -106,7 +106,7 @@ namespace Trinity::Impl private: EVP_MD_CTX* _ctx; - Digest _digest; + Digest _digest = { }; }; } diff --git a/src/common/Cryptography/HMAC.h b/src/common/Cryptography/HMAC.h index 18a236ebccd..200955df832 100644 --- a/src/common/Cryptography/HMAC.h +++ b/src/common/Cryptography/HMAC.h @@ -118,7 +118,7 @@ namespace Trinity::Impl Digest const& GetDigest() const { return _digest; } private: HMAC_CTX* _ctx; - Digest _digest; + Digest _digest = { }; }; } diff --git a/src/common/Cryptography/SessionKeyGenerator.h b/src/common/Cryptography/SessionKeyGenerator.h index af787358981..144ff00ff56 100644 --- a/src/common/Cryptography/SessionKeyGenerator.h +++ b/src/common/Cryptography/SessionKeyGenerator.h @@ -53,7 +53,9 @@ class SessionKeyGenerator } private: - typename Hash::Digest o0, o1, o2; + typename Hash::Digest o0 = { }; + typename Hash::Digest o1 = { }; + typename Hash::Digest o2 = { }; typename Hash::Digest::const_iterator o0it; }; -- cgit v1.2.3