diff options
| author | Russell Yanofsky <[email protected]> | 2017-02-13 17:54:51 -0500 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2017-02-13 17:54:51 -0500 |
| commit | 9acf25cc013c013ee5b07dba7b1319b7c5a7b6a4 (patch) | |
| tree | 4565391074de7304a344e97c1418ada6ff11fc38 /src/wallet | |
| parent | Merge #9736: Pre-0.14.0 hardcoded seeds update (diff) | |
| download | discoin-9acf25cc013c013ee5b07dba7b1319b7c5a7b6a4.tar.xz discoin-9acf25cc013c013ee5b07dba7b1319b7c5a7b6a4.zip | |
Return error when importmulti called with invalid address.
Lack of error checking noticed by Alex Morcos <[email protected]>
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 7d4ed70ed..738643eb0 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -671,6 +671,9 @@ UniValue processImport(const UniValue& data) { 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)) { |