diff options
author | practicalswift <practicalswift@users.noreply.github.com> | 2018-07-19 10:30:20 +0200 |
---|---|---|
committer | practicalswift <practicalswift@users.noreply.github.com> | 2018-07-19 21:13:03 +0200 |
commit | 27ee53c1aedae4f27458537c61804b6fef34ce3c (patch) | |
tree | 7f0a49d951d60e2c69df1f519eb7da990928f090 /src/wallet | |
parent | 722326389989757c58879feb74cc2480bd58bdfc (diff) | |
download | bitcoin-27ee53c1aedae4f27458537c61804b6fef34ce3c.tar.xz |
wallet: Add error handling. Check return value of ParseUInt32(...) in ParseHDKeypath(...).
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/rpcwallet.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 78ea5eac92..02cdd0f9f1 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4433,7 +4433,9 @@ bool ParseHDKeypath(std::string keypath_str, std::vector<uint32_t>& keypath) return false; } uint32_t number; - ParseUInt32(item, &number); + if (!ParseUInt32(item, &number)) { + return false; + } path |= number; keypath.push_back(path); |