mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-01 00:18:15 +01:00
When a backquote command inside a here-document had a pipe with more
than two processes (got that? :-), the stdin fd of the middle processes that has just been set up was accidetially closed. Don't do this. PR: bin/14527
This commit is contained in:
parent
8488257344
commit
74eeb719fd
@ -499,7 +499,8 @@ evalpipe(n)
|
||||
close(prevfd);
|
||||
}
|
||||
if (pip[1] >= 0) {
|
||||
close(pip[0]);
|
||||
if (!prevfd > 0)
|
||||
close(pip[0]);
|
||||
if (pip[1] != 1) {
|
||||
close(1);
|
||||
copyfd(pip[1], 1);
|
||||
|
Loading…
Reference in New Issue
Block a user