diff options
| -rw-r--r-- | miasm2/analysis/data_flow.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/miasm2/analysis/data_flow.py b/miasm2/analysis/data_flow.py index bba598e0..a560e9b8 100644 --- a/miasm2/analysis/data_flow.py +++ b/miasm2/analysis/data_flow.py @@ -472,18 +472,22 @@ def merge_blocks(ircfg, loc_key_entries): # Test jmp only block son = _test_jmp_only(ircfg, loc_key) if son is not None and loc_key not in loc_key_entries: - modified |= _remove_to_son(ircfg, loc_key, son) - todo.add(loc_key) - continue + ret = _remove_to_son(ircfg, loc_key, son) + modified |= ret + if ret: + todo.add(loc_key) + continue # Test head jmp only block if (son is not None and son not in loc_key_entries and son in ircfg.blocks): # jmp only test done previously - modified |= _remove_to_parent(ircfg, loc_key, son) - todo.add(loc_key) - continue + ret = _remove_to_parent(ircfg, loc_key, son) + modified |= ret + if ret: + todo.add(loc_key) + continue return modified |