diff options
| author | Rich Felker <dalias@aerifal.cx> | 2012-06-20 14:47:34 -0400 |
|---|---|---|
| committer | Rich Felker <dalias@aerifal.cx> | 2012-06-20 14:47:34 -0400 |
| commit | 9799560f79d37fb53d821b2f0b591a6ff260ebc3 (patch) | |
| tree | 2dda22409bb1ba24ffc8def0ed54a3d0cce8a797 /src | |
| parent | 9c21f4342c787e04a9e31ad8a1d87a65c89968ca (diff) | |
| download | musl-9799560f79d37fb53d821b2f0b591a6ff260ebc3.tar.gz | |
fix invalid memory access in pclose
Diffstat (limited to 'src')
| -rw-r--r-- | src/stdio/pclose.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/stdio/pclose.c b/src/stdio/pclose.c index c2fe7a24..7c777966 100644 --- a/src/stdio/pclose.c +++ b/src/stdio/pclose.c @@ -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; } |
