diff options
author | jilles <jilles@FreeBSD.org> | 2014-10-31 22:28:10 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2014-10-31 22:28:10 +0000 |
commit | a2ae3a60f9dcb97e007d43119443b80cb85a8f84 (patch) | |
tree | 23eaaab2f0d08d92dfb181fe9c78341f0590a848 /bin/sh/expand.c | |
parent | 41b6a835472de042268a29723b3c9291dfb7e24d (diff) | |
download | FreeBSD-src-a2ae3a60f9dcb97e007d43119443b80cb85a8f84.zip FreeBSD-src-a2ae3a60f9dcb97e007d43119443b80cb85a8f84.tar.gz |
sh: Fix corruption of CTL* bytes in positional parameters in redirection.
EXP_REDIR was not being checked for while expanding positional parameters in
redirection, so CTL* bytes were not being prefixed where they should be.
MFC after: 1 week
Diffstat (limited to 'bin/sh/expand.c')
-rw-r--r-- | bin/sh/expand.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index 0a9d329..d4c4c5a 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -862,7 +862,7 @@ varisset(const char *name, int nulok) static void strtodest(const char *p, int flag, int subtype, int quoted) { - if (flag & (EXP_FULL | EXP_CASE) && subtype != VSLENGTH) + if (flag & (EXP_FULL | EXP_CASE | EXP_REDIR) && subtype != VSLENGTH) STPUTS_QUOTES(p, quoted ? DQSYNTAX : BASESYNTAX, expdest); else STPUTS(p, expdest); |