[git commit] ash: fix handling of bashism $'xxx' with high-bit chars. Closes 9236
Denys Vlasenko
vda.linux at googlemail.com
Tue Sep 20 15:04:09 UTC 2016
commit: https://git.busybox.net/busybox/commit/?id=244fdd45c798477d6ee2e221a8c2473647b402d6
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/ash.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/shell/ash.c b/shell/ash.c
index a885514..d96e568 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -11229,6 +11229,9 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
c = decode_dollar_squote();
if (c & 0x100) {
USTPUTC('\\', out);
+ if (eofmark == NULL || dblquote)
+ /* Or else this SEGVs: $'\<0x82>' */
+ USTPUTC(CTLESC, out);
c = (unsigned char)c;
}
}
More information about the busybox-cvs
mailing list