From f95a3e4baabc1c74cfb5a8c6b33f4a2a7ff91841 Mon Sep 17 00:00:00 2001 From: rollsafe Date: Tue, 2 Jul 2019 18:28:13 -0400 Subject: Fix infinite loop for basic blocks with invalid instructions --- python/basicblock.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python') 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 -- cgit v1.3.1