From 2677ade5023a05e97375ee3d97e2c4aab6c54b8f Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 10 Oct 2017 10:43:36 +0100 Subject: simplewallet: forbid 0 ring size It'd be interpreted as a huge one (~0 fake outs) --- src/simplewallet/simplewallet.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/simplewallet/simplewallet.cpp') diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp index 7a3d80058..f1a3aac51 100644 --- a/src/simplewallet/simplewallet.cpp +++ b/src/simplewallet/simplewallet.cpp @@ -2585,6 +2585,11 @@ bool simple_wallet::transfer_main(int transfer_type, const std::vector &a if (fake_outs_count == 0) fake_outs_count = DEFAULT_MIX; } + else if (ring_size == 0) + { + fail_msg_writer() << tr("Ring size must not be 0"); + return true; + } else { fake_outs_count = ring_size - 1; -- cgit v1.2.3