Skip to content

Commit ce693fc

Browse files
committed
Poll before reading /proc/maps in process.libs()
Try to avoid race condition of reading memory maps before libraries are loaded.
1 parent e341e23 commit ce693fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pwnlib/tubes/process.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1323,7 +1323,7 @@ def libs(self):
13231323
space.
13241324
"""
13251325
from pwnlib.util.proc import memory_maps
1326-
maps_raw = memory_maps(self.pid)
1326+
maps_raw = self.poll() is not None and memory_maps(self.pid)
13271327

13281328
if not maps_raw:
13291329
import pwnlib.elf.elf

0 commit comments

Comments
 (0)