summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorRyan Snyder <ryan@vector35.com>2018-09-17 15:29:23 -0400
committerRyan Snyder <ryan@vector35.com>2018-09-17 15:29:23 -0400
commit2d0c2b83fbf7b08dde00bd541cac374f4a8e8e76 (patch)
tree13aa44552c5350ca688598913917df9d1e0d70eb /python
parent409de0f7804a49b6dcc9c8a14307de2be29ecd60 (diff)
api: fix read beyond bounds of basic block
Diffstat (limited to 'python')
-rw-r--r--python/basicblock.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/basicblock.py b/python/basicblock.py
index 353771d9..c98794cb 100644
--- a/python/basicblock.py
+++ b/python/basicblock.py
@@ -303,7 +303,7 @@ class BasicBlock(object):
idx = start
while idx < end:
- data = self.view.read(idx, self.arch.max_instr_length)
+ data = self.view.read(idx, min(self.arch.max_instr_length, end - idx))
inst_info = self.arch.get_instruction_info(data, idx)
inst_text = self.arch.get_instruction_text(data, idx)