mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
fix overflow with wait options
python expects options to be a signed 32bit integer
This commit is contained in:
@@ -11,6 +11,8 @@ from qiling.os.posix.const import ECHILD
|
||||
def ql_syscall_wait4(ql: Qiling, pid: int, wstatus: int, options: int, rusage: int):
|
||||
# convert to signed (pid_t is 32bit)
|
||||
pid = ql.unpack32s(ql.pack32(pid))
|
||||
# python expects options to be a signed 32bit int
|
||||
options = ql.unpack32s(ql.pack32(options))
|
||||
|
||||
try:
|
||||
spid, status, _ = os.wait4(pid, options)
|
||||
|
||||
Reference in New Issue
Block a user