mirror of
https://github.com/mandiant/capa.git
synced 2026-07-05 12:17:16 -07:00
fixes 191
This commit is contained in:
committed by
Ana María Martínez Gómez
parent
41a8199770
commit
4c5a104055
@@ -78,7 +78,9 @@ def extract_function_loop(f):
|
||||
for bb in f.basic_blocks:
|
||||
if len(bb.instructions) > 0:
|
||||
for bva, bflags in bb.instructions[-1].getBranches():
|
||||
if bflags & vivisect.envi.BR_COND or bflags & vivisect.envi.BR_FALL or bflags & vivisect.envi.BR_TABLE:
|
||||
# vivisect does not set branch flags for non-conditional jmp so add explicit check
|
||||
if bflags & vivisect.envi.BR_COND or bflags & vivisect.envi.BR_FALL or bflags & vivisect.envi.BR_TABLE \
|
||||
or bb.instructions[-1].mnem == "jmp":
|
||||
edges.append((bb.va, bva))
|
||||
|
||||
if edges and loops.has_loop(edges):
|
||||
|
||||
Reference in New Issue
Block a user