aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@stack.nl>2010-05-27 20:07:29 +1000
committermaximilian attems <max@stro.at>2011-06-03 18:44:12 +0200
commitf2b5fb829c5620f51beea565c6aa24a99253fe13 (patch)
tree450f8979a9855dce93c85335e095cc020b61190b
parent405d07c99529e043366ce429e0289002c529033d (diff)
downloadklibc-f2b5fb829c5620f51beea565c6aa24a99253fe13.tar.gz
[klibc] [EXPAND] Fix corruption of redirections with byte 0x81
In other ash variants, a partial implementation of ksh-like cmd >file* adds and removes CTLESC bytes ('\x81') in redirection filenames, preserving 8-bit transparency. Long ago, dash removed the code to add the CTLESC bytes, but not the code to remove them, causing corruption of filenames containing CTLESC. This commit removes the code to remove the CTLESC bytes. The CTLESC byte occurs frequently in UTF-8 encoded non-Latin text. This bug has been reported various times to Ubuntu and Debian (e.g. Launchpad Ubuntu #422298). This patch is the same as the one submitted by Alexander Korolkov in Ubuntu #422298. Signed-off-by: Jilles Tjoelker <jilles@stack.nl> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: maximilian attems <max@stro.at>
-rw-r--r--usr/dash/expand.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/usr/dash/expand.c b/usr/dash/expand.c
index 2699460d8b5ae..d5d11d5c39cd8 100644
--- a/usr/dash/expand.c
+++ b/usr/dash/expand.c
@@ -210,8 +210,6 @@ expandarg(union node *arg, struct arglist *arglist, int flag)
exparg.lastp = &exparg.list;
expandmeta(exparg.list, flag);
} else {
- if (flag & EXP_REDIR) /*XXX - for now, just remove escapes */
- rmescapes(p);
sp = (struct strlist *)stalloc(sizeof (struct strlist));
sp->text = p;
*exparg.lastp = sp;