fix crash: RPC "createmultisig" and "addmultisigaddress"#5706
fix crash: RPC "createmultisig" and "addmultisigaddress"#5706laanwj merged 1 commit intobitcoin:masterfrom fsb4000:patch-2
Conversation
|
Thanks for reporting this in such detail. I'm not sure this limitation is intended, so we may go for a different fix. |
|
Pretty sure it should fail with >15 due to the P2SH limitations. |
|
Right, I remember now, we already check the resulting script against MAX_SCRIPT_ELEMENT_SIZE for that later. The issue is that some assertion before that fails while constructing the script In any case, the proposed fix to hardcode a limit at 16 (because the underlying code fails) is not so bad then. Though it may make sense to move the check down to GetScriptForMultisig instead of in the RPC code, so that potential other usages of it get a clear error. |
|
luke-jr:
Yes, it should. But I left a restriction on 16 because static const unsigned int MAX_SCRIPT_ELEMENT_SIZE = 520; // bytesmay change in the future |
|
Not likely, that'd be a hardfork. |
e5d9d77 fix crash: createmultisig and addmultisigaddress (fsb4000)
Rebased-From: e5d9d77 Github-Pull: bitcoin#5706 (cherry picked from commit 7f502be)
Bug description:
or
or
About the fix:
and
similar to novacoin-project/novacoin#125