projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9c21f43
)
fix invalid memory access in pclose
author
Rich Felker
<dalias@aerifal.cx>
Wed, 20 Jun 2012 18:47:34 +0000
(14:47 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Wed, 20 Jun 2012 18:47:34 +0000
(14:47 -0400)
src/stdio/pclose.c
patch
|
blob
|
history
diff --git
a/src/stdio/pclose.c
b/src/stdio/pclose.c
index c2fe7a24a85107e95e58c8aa947524156dcca6b6..7c7779663e2dd6c191311e5e2cbf65340b00a7a9 100644
(file)
--- 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;
}