mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
syscalls: waitpid: fix possible null pointer dereference
This commit is contained in:
@@ -92,8 +92,9 @@ syscallret syscall_waitpid(pid_t pid, int *status, int options){
|
||||
else{
|
||||
proc->child = child->sibling;
|
||||
}
|
||||
|
||||
*status = child->status; // XXX safer way of doing this
|
||||
|
||||
if(status)
|
||||
*status = child->status; // XXX safer way of doing this
|
||||
|
||||
// the pointer to the last remaining thread is is proc->threads
|
||||
|
||||
|
||||
Reference in New Issue
Block a user