aboutsummaryrefslogtreecommitdiff
path: root/shell/hush.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-10 20:13:40 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-10 20:13:40 +0000
commit43360e51781942730f91bb19821e3f8f1087e4fa (patch)
treeaed87780129aa4f24a47c868c1067bf44b92a55b /shell/hush.c
parent2e76c3f9016f674dad7a38ec7ba5b068d233f189 (diff)
downloadbusybox-43360e51781942730f91bb19821e3f8f1087e4fa.tar.gz
hush: fix escaping of \[*?; add testsuites for these and for globbing
Diffstat (limited to 'shell/hush.c')
-rw-r--r--shell/hush.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 82bad664d..e57f6e371 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -3638,7 +3638,6 @@ static int parse_stream(o_string *dest, struct p_context *ctx,
debug_printf_parse("parse_stream return 1: \\<eof>\n");
return 1;
}
- o_addqchr(dest, '\\', dest->o_quote);
o_addqchr(dest, i_getch(input), dest->o_quote);
break;
case '$':
@@ -3653,7 +3652,7 @@ static int parse_stream(o_string *dest, struct p_context *ctx,
ch = i_getch(input);
if (ch == EOF || ch == '\'')
break;
- o_addchr(dest, ch);
+ o_addqchr(dest, ch, 1);
}
if (ch == EOF) {
syntax("unterminated '");