Skip to content

Commit

Permalink
Exclude section end from valid addr range
Browse files Browse the repository at this point in the history
  • Loading branch information
NeoQuix committed Aug 14, 2024
1 parent 873f94b commit 88c3a7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion decompiler/frontend/binaryninja/handlers/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def _get_string_at(view: BinaryView, addr: int, width: int) -> Optional[str]:
def addr_in_section(view: BinaryView, addr: int) -> bool:
"""Returns True if address is contained in a section, False otherwise"""
for _, section in view.sections.items():
if addr >= section.start and addr <= section.end:
if addr >= section.start and addr < section.end:
return True
return False

Expand Down

0 comments on commit 88c3a7b

Please sign in to comment.