aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-09-20 17:04:09 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2016-09-20 17:04:09 +0200
commit244fdd45c798477d6ee2e221a8c2473647b402d6 (patch)
tree007340b0eb9add53ab4b4fda7de808fa204375d3
parentd6a37d86ba65ce3d43600bfc52f7ba56de68942d (diff)
downloadbusybox-w32-244fdd45c798477d6ee2e221a8c2473647b402d6.tar.gz
busybox-w32-244fdd45c798477d6ee2e221a8c2473647b402d6.tar.bz2
busybox-w32-244fdd45c798477d6ee2e221a8c2473647b402d6.zip
ash: fix handling of bashism $'xxx' with high-bit chars. Closes 9236
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index a885514d3..d96e56851 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11229,6 +11229,9 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
11229 c = decode_dollar_squote(); 11229 c = decode_dollar_squote();
11230 if (c & 0x100) { 11230 if (c & 0x100) {
11231 USTPUTC('\\', out); 11231 USTPUTC('\\', out);
11232 if (eofmark == NULL || dblquote)
11233 /* Or else this SEGVs: $'\<0x82>' */
11234 USTPUTC(CTLESC, out);
11232 c = (unsigned char)c; 11235 c = (unsigned char)c;
11233 } 11236 }
11234 } 11237 }