diff options
| author | Pieter Wuille <[email protected]> | 2016-04-25 12:32:01 +0200 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2016-04-25 14:22:30 +0200 |
| commit | 4f87af6fc7580912726f9bf833c21e6e1b478e1d (patch) | |
| tree | 088a073fa227654bdfc16b28a090dfb23c21b239 /src/script/script.h | |
| parent | Introduce constant for maximum CScript length (diff) | |
| download | discoin-4f87af6fc7580912726f9bf833c21e6e1b478e1d.tar.xz discoin-4f87af6fc7580912726f9bf833c21e6e1b478e1d.zip | |
Treat overly long scriptPubKeys as unspendable
Diffstat (limited to 'src/script/script.h')
| -rw-r--r-- | src/script/script.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script.h b/src/script/script.h index 68cde03e3..2a338d6f5 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -624,7 +624,7 @@ public: */ bool IsUnspendable() const { - return (size() > 0 && *begin() == OP_RETURN); + return (size() > 0 && *begin() == OP_RETURN) || (size() > MAX_SCRIPT_SIZE); } void clear() |