From 63822fbc844de097265b3dada6757109acd1d3a9 Mon Sep 17 00:00:00 2001 From: Kaz Wesley Date: Mon, 18 Apr 2016 14:56:02 -0700 Subject: [PATCH] CBase58Data::SetString: cleanse the full vector SetString seems to be passing the length of the wrong variable to memory_cleanse, resulting in the last byte of the temporary buffer not being securely erased. --- src/base58.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base58.cpp b/src/base58.cpp index 09977ea35..33a6f4709 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -175,7 +175,7 @@ bool CBase58Data::SetString(const char* psz, unsigned int nVersionBytes) vchData.resize(vchTemp.size() - nVersionBytes); if (!vchData.empty()) memcpy(&vchData[0], &vchTemp[nVersionBytes], vchData.size()); - memory_cleanse(&vchTemp[0], vchData.size()); + memory_cleanse(&vchTemp[0], vchTemp.size()); return true; }