diff options
author | stefanf <stefanf@FreeBSD.org> | 2008-07-30 21:07:04 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2008-07-30 21:07:04 +0000 |
commit | 9877131bfb2caf9658c03931db68b0d7e95b9b57 (patch) | |
tree | 7af70ba91b35fc54207170fe3d40c6a6d48e2fab /bin/sh | |
parent | 4ffedc310b77717888890137221df8ea55bf7969 (diff) | |
download | FreeBSD-src-9877131bfb2caf9658c03931db68b0d7e95b9b57.zip FreeBSD-src-9877131bfb2caf9658c03931db68b0d7e95b9b57.tar.gz |
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
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 7ceaa94..e1a3ce7 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -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; |