diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-15 10:30:28 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-12-15 11:01:14 +0000 |
commit | 043494924bbeb2cea7d1ae95bc111c703e608f14 (patch) | |
tree | 2c855c308d4c6fdf680abb02bbb9774a7374c339 /src/wallet/wallet2.cpp | |
parent | Merge pull request #2906 (diff) | |
download | monero-043494924bbeb2cea7d1ae95bc111c703e608f14.tar.xz |
wallet2: error out in get_seed if the language is invalid
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index e29e1051c..f1343731d 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -630,7 +630,11 @@ bool wallet2::get_seed(std::string& electrum_words, const std::string &passphras crypto::secret_key key = get_account().get_keys().m_spend_secret_key; if (!passphrase.empty()) key = cryptonote::encrypt_key(key, passphrase); - crypto::ElectrumWords::bytes_to_words(key, electrum_words, seed_language); + if (!crypto::ElectrumWords::bytes_to_words(key, electrum_words, seed_language)) + { + std::cout << "Failed to create seed from key for language: " << seed_language << std::endl; + return false; + } return true; } |