Skip to content

Commit 4f87af6

Browse files
committed
Treat overly long scriptPubKeys as unspendable
1 parent f8e6fb1 commit 4f87af6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/script/script.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ class CScript : public CScriptBase
624624
*/
625625
bool IsUnspendable() const
626626
{
627-
return (size() > 0 && *begin() == OP_RETURN);
627+
return (size() > 0 && *begin() == OP_RETURN) || (size() > MAX_SCRIPT_SIZE);
628628
}
629629

630630
void clear()

0 commit comments

Comments
 (0)