diff options
| author | practicalswift <[email protected]> | 2018-07-19 10:30:20 +0200 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-07-19 21:13:03 +0200 |
| commit | 27ee53c1aedae4f27458537c61804b6fef34ce3c (patch) | |
| tree | 7f0a49d951d60e2c69df1f519eb7da990928f090 | |
| parent | wallet: Add tests for ParseHDKeypath(...) (diff) | |
| download | discoin-27ee53c1aedae4f27458537c61804b6fef34ce3c.tar.xz discoin-27ee53c1aedae4f27458537c61804b6fef34ce3c.zip | |
wallet: Add error handling. Check return value of ParseUInt32(...) in ParseHDKeypath(...).
| -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 78ea5eac9..02cdd0f9f 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); |