Browse Source

Merge #7922: CBase58Data::SetString: cleanse the full vector

5770449 CBase58Data::SetString: cleanse the full vector (Kaz Wesley)
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
90653bc91d
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 2
      src/base58.cpp

2
src/base58.cpp

@ -177,7 +177,7 @@ bool CBase58Data::SetString(const char* psz, unsigned int nVersionBytes)
vchData.resize(vchTemp.size() - nVersionBytes); vchData.resize(vchTemp.size() - nVersionBytes);
if (!vchData.empty()) if (!vchData.empty())
memcpy(&vchData[0], &vchTemp[nVersionBytes], vchData.size()); memcpy(&vchData[0], &vchTemp[nVersionBytes], vchData.size());
memory_cleanse(&vchTemp[0], vchData.size()); memory_cleanse(&vchTemp[0], vchTemp.size());
return true; return true;
} }

Loading…
Cancel
Save