Fuzz test coverage was added around the ExtractDestination(s) functions in a29f522ba4aa71582b54025c5682b4c1687ae9f3. This commit contained an incorrect assertion that the number of required signatures in a multisig script was equal to the number of addresses. This is incorrect, as for an m-of-n multisig, m <= n.
a29f522ba4aa71582b54025c5682b4c1687ae9f3 also had an incorrect assertion on the maximum number of public keys per multisig. It checked that the number of keys was less than or equal to 16. This is incorrect, as it should be <= 20 (see MAX_PUBKEYS_PER_MULTISIG).
Both of these incorrect assertions are fixed in this commit accordingly.
Note: this is sort of moot because this behavior is deprecated and these fuzz tests are slated for removal in v23 when the deprecation period for -deprecatedrpc=addresses ends. However, for correctness and just in case, it’s fixed here.
Noticed here: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39152 Moot because this PR #22650 gets rid of all this code anyways