diff options
| author | rollsafe <rollsafe@users.noreply.github.com> | 2019-07-02 18:28:13 -0400 |
|---|---|---|
| committer | rollsafe <rollsafe@users.noreply.github.com> | 2019-07-02 18:28:13 -0400 |
| commit | f95a3e4baabc1c74cfb5a8c6b33f4a2a7ff91841 (patch) | |
| tree | 76dade760d6d7a9784af308c2dd59c44a641c9e7 /python | |
| parent | 45b0e3c0c0377d77e3c894e523ec33124a2f0f3e (diff) | |
Fix infinite loop for basic blocks with invalid instructions
Diffstat (limited to 'python')
| -rw-r--r-- | python/basicblock.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/python/basicblock.py b/python/basicblock.py index 4a451a38..98a7b212 100644 --- a/python/basicblock.py +++ b/python/basicblock.py @@ -176,6 +176,8 @@ class BasicBlock(object): start = self.start while start < self.end: length = self.view.get_instruction_length(start) + if length == 0: # invalid instruction. avoid infinite loop + break self._instLengths.append(length) self._instStarts.append(start) start += length |
