mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-23 13:11:15 -03:00
Ignore user-supplied fd redirections above 2 for builtins
Prevents e.g. specifying an fd which corresponds to the history file as the stdin for builtin_source
This commit is contained in:
@@ -1083,7 +1083,7 @@ bool parse_execution_context_t::determine_io_chain(const parse_node_t &statement
|
||||
}
|
||||
else
|
||||
{
|
||||
new_io.reset(new io_fd_t(source_fd, old_fd));
|
||||
new_io.reset(new io_fd_t(source_fd, old_fd, true));
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user