diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-02 16:41:16 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-02-02 16:41:16 +0000 |
commit | 8cea8d0cef647b429af87036718347b629c5d4dc (patch) | |
tree | 65007d1ddfbb6a6e835967e8b4f152503d837bc2 | |
parent | threadpool: catch exceptions in dtor, to avoid terminate (diff) | |
download | monero-8cea8d0cef647b429af87036718347b629c5d4dc.tar.xz |
simplewallet: double check a new multisig wallet is multisig
Coverity 182493
-rw-r--r-- | src/simplewallet/simplewallet.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index a6cef1bb9..b38ce7d86 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -816,7 +816,11 @@ bool simple_wallet::make_multisig(const std::vector<std::string> &args) } uint32_t total; - m_wallet->multisig(NULL, &threshold, &total); + if (!m_wallet->multisig(NULL, &threshold, &total)) + { + fail_msg_writer() << tr("Error creating multisig: new wallet is not multisig"); + return true; + } success_msg_writer() << std::to_string(threshold) << "/" << total << tr(" multisig address: ") << m_wallet->get_account().get_public_address_str(m_wallet->testnet()); |