From 27ee53c1aedae4f27458537c61804b6fef34ce3c Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 19 Jul 2018 10:30:20 +0200 Subject: [PATCH] wallet: Add error handling. Check return value of ParseUInt32(...) in ParseHDKeypath(...). --- src/wallet/rpcwallet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 78ea5eac922..02cdd0f9f19 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4433,7 +4433,9 @@ bool ParseHDKeypath(std::string keypath_str, std::vector& keypath) return false; } uint32_t number; - ParseUInt32(item, &number); + if (!ParseUInt32(item, &number)) { + return false; + } path |= number; keypath.push_back(path);