From c1d96aba96296bda1e6b792cb3762754613fa3d0 Mon Sep 17 00:00:00 2001 From: daeronmeyer Date: Sun, 11 Aug 2013 15:20:22 -0500 Subject: [PATCH] Update deserialize.py Put additional length check in place to handle Block #251526 (see: https://bitcointalk.org/index.php?topic=271761 ) --- backends/bitcoind/deserialize.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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 -- 1.7.1