ex0dus-0x / ex0dus-0x/fuzzable
Is there a problem with Binaryninja nature_loops function?
Open
- Dominant language
- Python
- Stars
- 549
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Description
def natural_loops(target: Function) -> int:
return sum([bb in bb.dominance_frontier for bb in target.basic_blocks])
The len() function will then return the length of this list, which is the number of basic blocks in target.basic_blocks, not the number of natural loops.
If you want to count the number of basic blocks that exist within their own dominance bounds (actually the number of natural loops), then you should use sum() instead of len().
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.