From: daeronmeyer Date: Sun, 11 Aug 2013 20:20:22 +0000 (-0500) Subject: Update deserialize.py X-Git-Url: https://git.novaco.in/?p=electrum-server.git;a=commitdiff_plain;h=c1d96aba96296bda1e6b792cb3762754613fa3d0 Update deserialize.py Put additional length check in place to handle Block #251526 (see: https://bitcointalk.org/index.php?topic=271761 ) --- diff --git a/backends/bitcoind/deserialize.py b/backends/bitcoind/deserialize.py index 066be33..6620583 100644 --- 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