Skip to content

Commit

Permalink
engine: analyze: Add cases of conflicting flags to Problem List.
Browse files Browse the repository at this point in the history
And skip processing such addresses, instead of throwing assert.
  • Loading branch information
pfalcon committed Nov 26, 2016
1 parent 7098cdd commit 33bf710
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,9 +850,14 @@ def analyze(callback=lambda cnt:None):
if analysis_current_func:
if fl == ADDRESS_SPACE.CODE | ADDRESS_SPACE.FUNC:
continue
assert fl in (ADDRESS_SPACE.CODE, ADDRESS_SPACE.UNK)
if fl not in (ADDRESS_SPACE.CODE, ADDRESS_SPACE.UNK):
log.warn("Unexpected flags 0x%x at 0x%x while tracing code branch, skipping it", fl, ea)
ADDRESS_SPACE.add_issue(ea, "Jump/flow into non-code")
continue
else:
if fl != ADDRESS_SPACE.UNK:
if fl != ADDRESS_SPACE.CODE:
ADDRESS_SPACE.add_issue(ea, "Jump/flow into non-code")
continue
elif analisys_stack_calls:
finish_func(analysis_current_func)
Expand Down

0 comments on commit 33bf710

Please sign in to comment.