From aa41ac216eb51d61512b4cadc95c809e094215ce Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Sun, 24 Aug 2014 21:16:51 -0400 Subject: Test IsPushOnly() with invalid push --- src/script.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/script.cpp') diff --git a/src/script.cpp b/src/script.cpp index 942e8810d..d6d6684f4 100644 --- a/src/script.cpp +++ b/src/script.cpp @@ -1874,9 +1874,11 @@ bool CScript::IsPushOnly() const const_iterator pc = begin(); while (pc < end()) { + // Note how a script with an invalid PUSHDATA returns False. opcodetype opcode; if (!GetOp(pc, opcode)) return false; + // Note that IsPushOnly() *does* consider OP_RESERVED to be a // push-type opcode, however execution of OP_RESERVED fails, so // it's not relevant to P2SH as the scriptSig would fail prior to -- cgit v1.2.3