Merge pull request #6561

c17fe81 wallet2: fix multisig data clearing stomping on a vector (moneromooo-monero)
This commit is contained in:
luigi1111 2020-06-08 14:21:33 -05:00
commit c4f4091dd4
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010

View File

@ -13094,7 +13094,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"); 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; 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()); k.reserve(m_transfers.size());
for (const auto &td: m_transfers) for (const auto &td: m_transfers)
k.push_back(td.m_multisig_k); k.push_back(td.m_multisig_k);