wallet2: fix multisig data clearing stomping on a vector

This commit is contained in:
moneromooo-monero 2020-05-19 10:45:40 +00:00 committed by wowario
parent 4eb2f5c2c8
commit 18cb1753b7
No known key found for this signature in database
GPG key ID: 24DCBE762DE9C111

View file

@ -13083,7 +13083,7 @@ size_t wallet2::import_multisig(std::vector<cryptonote::blobdata> blobs)
CHECK_AND_ASSERT_THROW_MES(info.size() + 1 <= m_multisig_signers.size() && info.size() + 1 >= m_multisig_threshold, "Wrong number of multisig sources");
std::vector<std::vector<rct::key>> k;
auto wiper = epee::misc_utils::create_scope_leave_handler([&](){memwipe(k.data(), k.size() * sizeof(k[0]));});
auto wiper = epee::misc_utils::create_scope_leave_handler([&](){for (auto &v: k) memwipe(v.data(), v.size() * sizeof(v[0]));});
k.reserve(m_transfers.size());
for (const auto &td: m_transfers)
k.push_back(td.m_multisig_k);