fix crash: createmultisig and addmultisigaddress
Rebased-From: e5d9d77df2
Github-Pull: #5706
This commit is contained in:
parent
047a898317
commit
7f502be259
@ -213,6 +213,8 @@ CScript _createmultisig_redeemScript(const Array& params)
|
|||||||
throw runtime_error(
|
throw runtime_error(
|
||||||
strprintf("not enough keys supplied "
|
strprintf("not enough keys supplied "
|
||||||
"(got %u keys, but need at least %d to redeem)", keys.size(), nRequired));
|
"(got %u keys, but need at least %d to redeem)", keys.size(), nRequired));
|
||||||
|
if (keys.size() > 16)
|
||||||
|
throw runtime_error("Number of addresses involved in the multisignature address creation > 16\nReduce the number");
|
||||||
std::vector<CPubKey> pubkeys;
|
std::vector<CPubKey> pubkeys;
|
||||||
pubkeys.resize(keys.size());
|
pubkeys.resize(keys.size());
|
||||||
for (unsigned int i = 0; i < keys.size(); i++)
|
for (unsigned int i = 0; i < keys.size(); i++)
|
||||||
|
Loading…
Reference in New Issue
Block a user