diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-02-15 15:31:04 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-02-15 16:29:16 +0100 |
commit | 7a93af8340d95add7f0d9ddf051aa242302cfc10 (patch) | |
tree | 7e7e6fdd4e47baa194cd284e1b92e478f49c51bb /src/wallet | |
parent | 476cc47da084633ac17b9b3c9257fab425b3bbba (diff) | |
parent | 9acf25cc013c013ee5b07dba7b1319b7c5a7b6a4 (diff) |
Merge #9756: Return error when importmulti called with invalid address.
9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/rpcdump.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 0a3225937e..908655d411 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -672,6 +672,9 @@ UniValue ProcessImport(const UniValue& data, const int64_t timestamp) if (!isScript) { address = CBitcoinAddress(output); + if (!address.IsValid()) { + throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid address"); + } script = GetScriptForDestination(address.Get()); } else { if (!IsHex(output)) { |