Skip to content

Commit

Permalink
sequence: better collect sequence-related addresses from Range statem…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
williballenthin committed Jan 17, 2025
1 parent 08ca1d8 commit deb33f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions capa/render/vverbose.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,13 @@ def collect_sequence_locations(
child_mode = MODE_FAILURE if mode == MODE_SUCCESS else MODE_SUCCESS
for child in match.children:
yield from collect_sequence_locations(child, child_mode)
elif isinstance(match.node.statement, rd.RangeStatement):
for location in match.locations:
if location.type not in (frz.AddressType.CALL, ):
continue
if mode == MODE_FAILURE:
continue
yield location
else:
for child in match.children:
yield from collect_sequence_locations(child, mode)
Expand Down

0 comments on commit deb33f2

Please sign in to comment.