From 6380180821917c22ecfd89128ee60aae6f4cac33 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Mon, 10 Mar 2014 17:36:35 -0400 Subject: Add rejection of non-null CHECKMULTISIG dummy values This is a source of transaction mutability as the dummy value was previously not checked and could be modified to something other than the usual OP_0 value. --- src/script.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/script.h') diff --git a/src/script.h b/src/script.h index 0f26fb556d..01779f550c 100644 --- a/src/script.h +++ b/src/script.h @@ -42,6 +42,7 @@ enum SCRIPT_VERIFY_STRICTENC = (1U << 1), // enforce strict conformance to DER and SEC2 for signatures and pubkeys SCRIPT_VERIFY_EVEN_S = (1U << 2), // enforce even S values in signatures (depends on STRICTENC) SCRIPT_VERIFY_NOCACHE = (1U << 3), // do not store results in signature cache (but do query it) + SCRIPT_VERIFY_NULLDUMMY = (1U << 4), // verify dummy stack item consumed by CHECKMULTISIG is of zero-length }; // Mandatory script verification flags that all new blocks must comply with for @@ -54,7 +55,8 @@ static const unsigned int MANDATORY_SCRIPT_VERIFY_FLAGS = SCRIPT_VERIFY_P2SH; // with. However scripts violating these flags may still be present in valid // blocks and we must accept those blocks. static const unsigned int STANDARD_SCRIPT_VERIFY_FLAGS = MANDATORY_SCRIPT_VERIFY_FLAGS | - SCRIPT_VERIFY_STRICTENC; + SCRIPT_VERIFY_STRICTENC | + SCRIPT_VERIFY_NULLDUMMY; enum txnouttype { -- cgit v1.2.3