diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-09-20 16:51:56 -0400 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-09-20 16:51:56 -0400 |
| commit | dd9a865f2ebcb4dfbe462154114f495e49a16fe4 (patch) | |
| tree | 9fffa7b1fa1c6b0f8c90dfad603fab7a07519852 /python/basicblock.py | |
| parent | f48203de0acafb1d981d56c79d0edff921102065 (diff) | |
| parent | 536908c5d4ba2f919765b41a050269669c800a75 (diff) | |
Merge branch 'dev' into test_relocation
Diffstat (limited to 'python/basicblock.py')
| -rw-r--r-- | python/basicblock.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/python/basicblock.py b/python/basicblock.py index 353771d9..8f16f71a 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -303,14 +303,12 @@ class BasicBlock(object): idx = start while idx < end: - data = self.view.read(idx, self.arch.max_instr_length) - inst_info = self.arch.get_instruction_info(data, idx) + data = self.view.read(idx, min(self.arch.max_instr_length, end - idx)) inst_text = self.arch.get_instruction_text(data, idx) - - if inst_info is None: + if inst_text[1] == 0: break yield inst_text - idx += inst_info.length + idx += inst_text[1] def mark_recent_use(self): core.BNMarkBasicBlockAsRecentlyUsed(self.handle) |
