mirror of
https://github.com/fluencelabs/musl
synced 2025-07-31 06:11:57 +00:00
fix invalid memory access in pclose
This commit is contained in:
@@ -3,8 +3,9 @@
|
||||
int pclose(FILE *f)
|
||||
{
|
||||
int status;
|
||||
pid_t pid = f->pipe_pid;
|
||||
fclose(f);
|
||||
while (waitpid(f->pipe_pid, &status, 0) == -1)
|
||||
while (waitpid(pid, &status, 0) == -1)
|
||||
if (errno != EINTR) return -1;
|
||||
return status;
|
||||
}
|
||||
|
Reference in New Issue
Block a user