mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-02 01:04:43 +02:00
rpc: Fix for segfault if combinepsbt called with empty inputs
This commit is contained in:
@@ -1514,6 +1514,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;
|
||||
|
||||
Reference in New Issue
Block a user