X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Frpcwallet.cpp;h=046c190d16f44f806221bcfc01d38498755d0a02;hb=5ed0a2b839d4654c252e63b86352c7b1bcbb69ab;hp=1575f3a76920188015cb701a36c993806aefff8f;hpb=69599ecf22ab6ed50801c6641dd17cd4c24e3e39;p=novacoin.git diff --git a/src/rpcwallet.cpp b/src/rpcwallet.cpp index 1575f3a..046c190 100644 --- a/src/rpcwallet.cpp +++ b/src/rpcwallet.cpp @@ -847,6 +847,11 @@ Value addmultisigaddress(const Array& params, bool fHelp) // Construct using pay-to-script-hash: CScript inner; inner.SetMultisig(nRequired, pubkeys); + + if (inner.size() > MAX_SCRIPT_ELEMENT_SIZE) + throw runtime_error( + strprintf("redeemScript exceeds size limit: %" PRIszu " > %d", inner.size(), MAX_SCRIPT_ELEMENT_SIZE)); + CScriptID innerID = inner.GetID(); pwalletMain->AddCScript(inner);