From 84393062120751921b54bea47e4b9b5b7b91910e Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 31 Jul 2018 14:25:29 +0000 Subject: [PATCH] wallet2: do not divide by 0 on invalid daemon response --- src/wallet/wallet2.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 90807803a..663bcb215 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -10843,6 +10843,7 @@ std::vector> wallet2::estimate_backlog(const std:: const auto result = m_node_rpc_proxy.get_block_size_limit(block_size_limit); throw_on_rpc_response_error(result, "get_info"); uint64_t full_reward_zone = block_size_limit / 2; + THROW_WALLET_EXCEPTION_IF(full_reward_zone == 0, error::wallet_internal_error, "Invalid block size limit from daemon"); std::vector> blocks; for (const auto &fee_level: fee_levels)