Skip to content

Commit

Permalink
Check the name before attempting to call startswith() (#805)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachriggle committed Dec 14, 2016
1 parent 350610f commit 22f170a
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 @@ -235,7 +235,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 22f170a

Please sign in to comment.