diff options
| author | Kaz Wesley <[email protected]> | 2016-04-18 14:56:02 -0700 |
|---|---|---|
| committer | Kaz Wesley <[email protected]> | 2016-04-21 18:28:57 -0700 |
| commit | 57704499be948c640c789c7fc11ed1abf8a681bd (patch) | |
| tree | 4014056d20f7e57b578550295184029b7ff01e8b /src/base58.cpp | |
| parent | Merge #7912: Tests: Fix deserialization of reject messages (diff) | |
| download | discoin-57704499be948c640c789c7fc11ed1abf8a681bd.tar.xz discoin-57704499be948c640c789c7fc11ed1abf8a681bd.zip | |
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.
Diffstat (limited to 'src/base58.cpp')
| -rw-r--r-- | src/base58.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base58.cpp b/src/base58.cpp index d81c26092..d1d60a6f1 100644 --- a/src/base58.cpp +++ b/src/base58.cpp @@ -177,7 +177,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; } |