about summary refs log tree commit diff stats
path: root/miasm2/ir/ir.py
diff options
context:
space:
mode:
authorFabrice Desclaux <fabrice.desclaux@cea.fr>2018-04-06 17:48:09 +0200
committerFabrice Desclaux <fabrice.desclaux@cea.fr>2018-04-18 13:40:16 +0200
commitc1f5cfee785ce53f53173630c3196e7606d041b7 (patch)
tree4cf0defb0e248f25dda79c1d9c024acefc123560 /miasm2/ir/ir.py
parent14cfaeb15a54c4446b0de101a660d9c347eb612e (diff)
downloadmiasm-c1f5cfee785ce53f53173630c3196e7606d041b7.tar.gz
miasm-c1f5cfee785ce53f53173630c3196e7606d041b7.zip
IR: fix remove_jmp auto loop
Diffstat (limited to '')
-rw-r--r--miasm2/ir/ir.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/miasm2/ir/ir.py b/miasm2/ir/ir.py
index 67375c94..982399da 100644
--- a/miasm2/ir/ir.py
+++ b/miasm2/ir/ir.py
@@ -815,6 +815,10 @@ class IntermediateRepresentation(object):
                 continue
             if not expr_is_label(assignblk[self.IRDst]):
                 continue
+            dst = assignblk[self.IRDst].name
+            if dst == block.label:
+                # Infinite loop block
+                continue
             jmp_blocks.add(block.label)
 
         # Remove them, relink graph