Skip to content

Commit

Permalink
[libc] Fix find_libc_version for checking each readable maps
Browse files Browse the repository at this point in the history
  • Loading branch information
ValekoZ committed May 29, 2024
1 parent 757f5bb commit 786fc36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gef.py
Original file line number Diff line number Diff line change
Expand Up @@ -11505,7 +11505,7 @@ def version(self) -> Optional[Tuple[int, int]]:
@lru_cache()
def find_libc_version() -> Tuple[int, int]:
"""Attempt to determine the libc version. This operation can be long."""
libc_sections = (m for m in gef.memory.maps if "libc" in m.path and m.permission == Permission.READ)
libc_sections = (m for m in gef.memory.maps if "libc" in m.path and m.permission & Permission.READ)
for section in libc_sections:
# Try to determine from the filepath
match = re.search(GefLibcManager.PATTERN_LIBC_VERSION_FILENAME, section.path)
Expand Down

0 comments on commit 786fc36

Please sign in to comment.