Skip to content

Commit

Permalink
Check the name before attempting to call startswith()
Browse files Browse the repository at this point in the history
  • Loading branch information
zachriggle committed Dec 13, 2016
1 parent b83a6c7 commit 5ebc8b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pwnlib/elf/corefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def vsyscall(self):
def libc(self):
"""Return the first mapping in libc"""
for m in self.mappings:
if m.name.startswith('libc') and m.name.endswith('.so'):
if m.name and m.name.startswith('libc') and m.name.endswith('.so'):
return m

@property
Expand Down

0 comments on commit 5ebc8b5

Please sign in to comment.