Skip to content

Commit

Permalink
Merge pull request #1413 from Ninja3047/fix-wait-overflow
Browse files Browse the repository at this point in the history
Fix overflow with wait options
  • Loading branch information
xwings authored Dec 14, 2023
2 parents 0f3c154 + edbbbec commit 687b02f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qiling/os/posix/syscall/wait.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
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)
Expand Down

0 comments on commit 687b02f

Please sign in to comment.