diff options
| author | Cory Fields <[email protected]> | 2014-09-23 16:53:58 -0400 |
|---|---|---|
| committer | Cory Fields <[email protected]> | 2014-09-25 14:56:26 -0400 |
| commit | be6d87aa60c1aca886b557901a493119c2aac024 (patch) | |
| tree | 080a4fde2b9b3755807c620ecc67e1c7a31f1b0c /src/script/interpreter.cpp | |
| parent | tests: don't split an empty string (diff) | |
| download | discoin-be6d87aa60c1aca886b557901a493119c2aac024.tar.xz discoin-be6d87aa60c1aca886b557901a493119c2aac024.zip | |
script: don't read past the end
Diffstat (limited to 'src/script/interpreter.cpp')
| -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 d742fb9eb..a71f55dd2 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 */ |