diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-12 11:08:11 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-18 15:15:49 +0000 |
commit | b49ddc766de47b40aa705a0a0c0bb901c743908d (patch) | |
tree | edac56cb5d089c91a98164126b295b4cd6334b4d /src/wallet/api | |
parent | check return value for generate_key_derivation and derive_public_key (diff) | |
download | monero-b49ddc766de47b40aa705a0a0c0bb901c743908d.tar.xz |
check accessing an element past the end of a container
Diffstat (limited to 'src/wallet/api')
-rw-r--r-- | src/wallet/api/unsigned_transaction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wallet/api/unsigned_transaction.cpp b/src/wallet/api/unsigned_transaction.cpp index 4c8c5ade2..d22719189 100644 --- a/src/wallet/api/unsigned_transaction.cpp +++ b/src/wallet/api/unsigned_transaction.cpp @@ -293,6 +293,10 @@ std::vector<std::string> UnsignedTransactionImpl::recipientAddress() const // TODO: return integrated address if short payment ID exists std::vector<string> result; for (const auto &utx: m_unsigned_tx_set.txes) { + if (utx.dests.empty()) { + MERROR("empty destinations, skipped"); + continue; + } result.push_back(cryptonote::get_account_address_as_str(m_wallet.m_wallet->testnet(), utx.dests[0].is_subaddress, utx.dests[0].addr)); } return result; |