aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-07-19 10:30:20 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-07-19 21:13:03 +0200
commit27ee53c1aedae4f27458537c61804b6fef34ce3c (patch)
tree7f0a49d951d60e2c69df1f519eb7da990928f090
parent722326389989757c58879feb74cc2480bd58bdfc (diff)
wallet: Add error handling. Check return value of ParseUInt32(...) in ParseHDKeypath(...).
-rw-r--r--src/wallet/rpcwallet.cpp4
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);