git://git.novaco.in
/
electrum-server.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
9e6ad63
)
Update deserialize.py
author
daeronmeyer
<opensourceror@gmail.com>
Sun, 11 Aug 2013 20:20:22 +0000 (15:20 -0500)
committer
daeronmeyer
<opensourceror@gmail.com>
Sun, 11 Aug 2013 20:20:22 +0000 (15:20 -0500)
Put additional length check in place to handle Block #251526 (see: https://bitcointalk.org/index.php?topic=271761 )
backends/bitcoind/deserialize.py
patch
|
blob
|
history
diff --git
a/backends/bitcoind/deserialize.py
b/backends/bitcoind/deserialize.py
index
066be33
..
6620583
100644
(file)
--- a/
backends/bitcoind/deserialize.py
+++ b/
backends/bitcoind/deserialize.py
@@
-293,7
+293,7
@@
def script_GetOp(bytes):
vch = None
opcode = ord(bytes[i])
i += 1
- if opcode >= opcodes.OP_SINGLEBYTE_END:
+ if opcode >= opcodes.OP_SINGLEBYTE_END and i < len(bytes):
opcode <<= 8
opcode |= ord(bytes[i])
i += 1