What is the maximum number of multisigaddresses you can create? I have created a few multisig addresses, and just tried to create a 2 of 3 address, but it returned with the 'AddCScript() failed' error.

What is the maximum number of m-sig addresses and where is this in the code? I'd like to know how to expand the limit for a test.
I realized what happened, the wallet was a massive size and the Write() function was failing.