aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorPeter Todd <[email protected]>2014-08-24 21:16:51 -0400
committerPeter Todd <[email protected]>2014-08-24 21:16:51 -0400
commitaa41ac216eb51d61512b4cadc95c809e094215ce (patch)
treeabfac83f5aee505a2e450cfb3e52c61f4aa7e21b /src/script.cpp
parentMerge pull request #4683 (diff)
downloaddiscoin-aa41ac216eb51d61512b4cadc95c809e094215ce.tar.xz
discoin-aa41ac216eb51d61512b4cadc95c809e094215ce.zip
Test IsPushOnly() with invalid push
Diffstat (limited to 'src/script.cpp')
-rw-r--r--src/script.cpp2
1 files changed, 2 insertions, 0 deletions
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