diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-02-11 08:08:10 -0500 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-02-11 08:08:17 -0500 |
commit | e84e0d4b5e1ffa0f1bddb2f70d64a66e3ca360e6 (patch) | |
tree | e7b666f1f88156e7bcc80c0130cd0d5dafaaa8f0 /src | |
parent | 6f4e0d154256c2041f15f0c4acba5707e985d649 (diff) | |
parent | 30d0f7be6e6bd45fed7195ddf31187438b02227a (diff) |
Merge #15337: rpc: Fix for segfault if combinepsbt called with empty inputs
30d0f7be6e rpc: Fix for segfault if combinepsbt called with empty inputs (benthecarman)
Pull request description:
Fixes #15300
Tree-SHA512: 25e7b4e6e48d8b0d197f0ab96df308fff33e2110f8929cb48914877fa7f4c4a84f173b1378fdb2dec5d03fe7d6d1aced4b577e55f9fe180d8147d9106ebf543f
Diffstat (limited to 'src')
-rw-r--r-- | src/rpc/rawtransaction.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index b3b9d8af09..cce62bacef 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1518,6 +1518,9 @@ UniValue combinepsbt(const JSONRPCRequest& request) // Unserialize the transactions std::vector<PartiallySignedTransaction> psbtxs; UniValue txs = request.params[0].get_array(); + if (txs.empty()) { + throw JSONRPCError(RPC_INVALID_PARAMETER, "Parameter 'txs' cannot be empty"); + } for (unsigned int i = 0; i < txs.size(); ++i) { PartiallySignedTransaction psbtx; std::string error; |