From 8ad6782bec71f0ba6933e7d82a5ae6b68d95dfbc Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 17 Mar 2017 21:53:38 -0400 Subject: [PATCH] Clear Coverity UNINIT_CTOR (CID 177743, 177744) This was a valid finding, but the only way to get into the codepath was leaving the drbg unkeyed. --- drbg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drbg.h b/drbg.h index 659ac680..3d533dc0 100644 --- a/drbg.h +++ b/drbg.h @@ -207,7 +207,7 @@ public: //! Hash_DRBG(const byte* entropy=NULLPTR, size_t entropyLength=STRENGTH, const byte* nonce=NULLPTR, size_t nonceLength=0, const byte* personalization=NULLPTR, size_t personalizationLength=0) - : NIST_DRBG(), m_c(SEEDLENGTH), m_v(SEEDLENGTH) + : NIST_DRBG(), m_reseed(0), m_c(SEEDLENGTH), m_v(SEEDLENGTH) { if (entropy != NULLPTR && entropyLength != 0) DRBG_Instantiate(entropy, entropyLength, nonce, nonceLength, personalization, personalizationLength); @@ -321,7 +321,7 @@ public: //! HMAC_DRBG(const byte* entropy=NULLPTR, size_t entropyLength=STRENGTH, const byte* nonce=NULLPTR, size_t nonceLength=0, const byte* personalization=NULLPTR, size_t personalizationLength=0) - : NIST_DRBG(), m_k(HASH::DIGESTSIZE), m_v(HASH::DIGESTSIZE) + : NIST_DRBG(), m_reseed(0), m_k(HASH::DIGESTSIZE), m_v(HASH::DIGESTSIZE) { if (entropy != NULLPTR && entropyLength != 0) DRBG_Instantiate(entropy, entropyLength, nonce, nonceLength, personalization, personalizationLength);