diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-05-09 16:03:34 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-05-09 16:09:20 +0200 |
commit | 54f102248b183618ed7bd198c995232c89dc3152 (patch) | |
tree | b07e33bf0b144389db6c2291e21881d9a211b7d9 /src/keystore.cpp | |
parent | 1c0319bb2ba227b67a10563ae5c9f65f4358c472 (diff) | |
parent | 787ee0c91394b0ae16ca2500dbacf9349e65b6bc (diff) |
Merge pull request #3843
787ee0c Check redeemScript size does not exceed 520 byte limit (Peter Todd)
4d79098 Increase IsStandard() scriptSig length (Peter Todd)
f80cffa Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails (Peter Todd)
6380180 Add rejection of non-null CHECKMULTISIG dummy values (Peter Todd)
29c1749 Let tx (in)valid tests use any SCRIPT_VERIFY flag (Peter Todd)
68f7d1d Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants (Peter Todd)
Diffstat (limited to 'src/keystore.cpp')
-rw-r--r-- | src/keystore.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/keystore.cpp b/src/keystore.cpp index 46402ea25b..594e0c61da 100644 --- a/src/keystore.cpp +++ b/src/keystore.cpp @@ -33,6 +33,9 @@ bool CBasicKeyStore::AddKeyPubKey(const CKey& key, const CPubKey &pubkey) bool CBasicKeyStore::AddCScript(const CScript& redeemScript) { + if (redeemScript.size() > MAX_SCRIPT_ELEMENT_SIZE) + return error("CBasicKeyStore::AddCScript() : redeemScripts > %i bytes are invalid", MAX_SCRIPT_ELEMENT_SIZE); + LOCK(cs_KeyStore); mapScripts[redeemScript.GetID()] = redeemScript; return true; |