aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2014-08-26 16:49:41 +0200
committerPieter Wuille <[email protected]>2014-08-26 16:50:17 +0200
commit727298cef34005c523117adbb2249c8df2c7f89d (patch)
tree2394c438b350e12433256cff803e1b3654cdf7c0 /src/script.cpp
parentMerge pull request #4561 (diff)
parentTest IsPushOnly() with invalid push (diff)
downloaddiscoin-727298cef34005c523117adbb2249c8df2c7f89d.tar.xz
discoin-727298cef34005c523117adbb2249c8df2c7f89d.zip
Merge pull request #4763
aa41ac2 Test IsPushOnly() with invalid push (Peter Todd)
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