1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-05-22 00:11:30 +02:00

51424: $(<...) shouldn't try to open a file with NO_EXEC

This commit is contained in:
Peter Stephenson 2023-02-14 09:21:19 +00:00
parent 03887bb03f
commit 7e0c4406ce
3 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2023-02-14 Peter Stephenson <p.stephenson@samsung.com>
* 51425: Src/exec.c, Test/E01OPTIONS: $(<...) shouldn't try to
open a file with NO_EXEC.
2023-02-13 Bart Schaefer <schaefer@zsh.org>
* 51430: Src/Modules/parameter.c, Src/builtin.c, Src/params.c,

View file

@ -4678,6 +4678,9 @@ getoutput(char *cmd, int qt)
if (!prog)
return NULL;
if (!isset(EXECOPT))
return newlinklist();
if ((s = simple_redir_name(prog, REDIR_READ))) {
/* $(< word) */
int stream;

View file

@ -416,6 +416,9 @@
1:NO_EXEC does recognize bad substitution syntax
*?* bad substitution
(setopt noexec; : $(<nonexistentfile))
0:NO_EXEC does not attempt to read files in $(<....)
setopt NO_eval_lineno
eval 'print $LINENO'
setopt eval_lineno