Pass the correct flags to expandarg() for NFROMFD and NTOFD. This fixes a
segmentation fault when the argument expands to an empty string. Reported by: simon MFC after: 3 weeks
This commit is contained in:
parent
feaed6c57e
commit
497157a78a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=181017
@ -437,7 +437,7 @@ expredir(union node *n)
|
||||
case NFROMFD:
|
||||
case NTOFD:
|
||||
if (redir->ndup.vname) {
|
||||
expandarg(redir->ndup.vname, &fn, EXP_FULL | EXP_TILDE);
|
||||
expandarg(redir->ndup.vname, &fn, EXP_TILDE | EXP_REDIR);
|
||||
fixredir(redir, fn.list->text, 1);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user