aboutsummaryrefslogtreecommitdiff
path: root/src/simplewallet/simplewallet.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-11 22:36:58 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-18 15:15:40 +0000
commit45a1c4c0885584554668c89bd6976474af01e2f5 (patch)
tree1e43812b37e0f2c2cb967f52133e0ddb09fbb61e /src/simplewallet/simplewallet.cpp
parenttests: fix a buffer overread in a unit test (diff)
downloadmonero-45a1c4c0885584554668c89bd6976474af01e2f5.tar.xz
add empty container sanity checks when using front() and back()
Diffstat (limited to '')
-rw-r--r--src/simplewallet/simplewallet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 64e665fb3..e34e718d2 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -4321,9 +4321,9 @@ bool simple_wallet::sweep_single(const std::vector<std::string> &args_)
fail_msg_writer() << tr("Multiple transactions are created, which is not supposed to happen");
return true;
}
- if (ptx_vector[0].selected_transfers.size() > 1)
+ if (ptx_vector[0].selected_transfers.size() != 1)
{
- fail_msg_writer() << tr("The transaction uses multiple inputs, which is not supposed to happen");
+ fail_msg_writer() << tr("The transaction uses multiple or no inputs, which is not supposed to happen");
return true;
}