* [PATCH] [EXPAND] Fix corruption of redirections with byte 0x81.
@ 2010-05-16 22:55 Jilles Tjoelker
2010-05-27 10:07 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Jilles Tjoelker @ 2010-05-16 22:55 UTC (permalink / raw)
To: dash
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>
---
src/expand.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/src/expand.c b/src/expand.c
index 48c45e5..f2f964c 100644
--- a/src/expand.c
+++ b/src/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;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-05-27 10:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-16 22:55 [PATCH] [EXPAND] Fix corruption of redirections with byte 0x81 Jilles Tjoelker
2010-05-27 10:07 ` Herbert Xu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.