diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2014-09-23 16:53:58 -0400 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2014-09-25 14:56:26 -0400 |
commit | be6d87aa60c1aca886b557901a493119c2aac024 (patch) | |
tree | 080a4fde2b9b3755807c620ecc67e1c7a31f1b0c | |
parent | a94496fbb672fce43b66f56ed0bbd69a560d5654 (diff) |
script: don't read past the end
-rw-r--r-- | src/script/interpreter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index d742fb9eb9..a71f55dd26 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -839,7 +839,8 @@ public: itBegin = it; } } - s.write((char*)&itBegin[0], it-itBegin); + if (itBegin != scriptCode.end()) + s.write((char*)&itBegin[0], it-itBegin); } /** Serialize an input of txTo */ |