diff options
| author | Ryan Snyder <ryan@vector35.com> | 2018-09-17 15:29:23 -0400 |
|---|---|---|
| committer | Ryan Snyder <ryan@vector35.com> | 2018-09-17 15:29:23 -0400 |
| commit | 2d0c2b83fbf7b08dde00bd541cac374f4a8e8e76 (patch) | |
| tree | 13aa44552c5350ca688598913917df9d1e0d70eb /python/basicblock.py | |
| parent | 409de0f7804a49b6dcc9c8a14307de2be29ecd60 (diff) | |
api: fix read beyond bounds of basic block
Diffstat (limited to 'python/basicblock.py')
| -rw-r--r-- | python/basicblock.py | 2 |
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) |
