diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-08-19 15:34:36 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-08-19 15:35:12 +0000 |
commit | 839fc6256b7a51c0120a476b592ea780ab97e46b (patch) | |
tree | 1c0915a332ea86fd95751303eb1264b1a7932263 /src | |
parent | Merge pull request #5685 (diff) | |
download | monero-839fc6256b7a51c0120a476b592ea780ab97e46b.tar.xz |
reject setting lookahead major or minor to 0
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 23c375924..8b9430ef3 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -1507,7 +1507,9 @@ void wallet2::set_subaddress_label(const cryptonote::subaddress_index& index, co //---------------------------------------------------------------------------------------------------- void wallet2::set_subaddress_lookahead(size_t major, size_t minor) { + THROW_WALLET_EXCEPTION_IF(major == 0, error::wallet_internal_error, "Subaddress major lookahead may not be zero"); THROW_WALLET_EXCEPTION_IF(major > 0xffffffff, error::wallet_internal_error, "Subaddress major lookahead is too large"); + THROW_WALLET_EXCEPTION_IF(minor == 0, error::wallet_internal_error, "Subaddress minor lookahead may not be zero"); THROW_WALLET_EXCEPTION_IF(minor > 0xffffffff, error::wallet_internal_error, "Subaddress minor lookahead is too large"); m_subaddress_lookahead_major = major; m_subaddress_lookahead_minor = minor; |