mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Test IsPushOnly() with invalid push
This commit is contained in:
parent
41abb02122
commit
aa41ac216e
2 changed files with 13 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue