Skip to content

Commit 5aafbc5

Browse files
committed
fix: update apport coredump path handling for CorefileFinder
1 parent 241b139 commit 5aafbc5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pwnlib/elf/corefile.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1510,7 +1510,10 @@ def apport_coredump(self):
15101510
# should be unique enough that we can just glob.
15111511

15121512
boot_id = read('/proc/sys/kernel/random/boot_id').strip().decode()
1513-
path = self.exe.replace('/', '_')
1513+
1514+
# Use the absolute path of the executable
1515+
# Apport uses the executable's pathname in the core filename
1516+
path = os.path.abspath(self.exe).replace('/', '_').replace('.', '_')
15141517

15151518
# Format the name
15161519
corefile_name = 'core.{path}.{uid}.{boot_id}.{pid}.*'.format(

0 commit comments

Comments
 (0)