From: Denys Vlasenko Date: Tue, 20 Sep 2016 15:04:09 +0000 (+0200) Subject: ash: fix handling of bashism $'xxx' with high-bit chars. Closes 9236 X-Git-Tag: 1_26_0~258 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=244fdd45c798477d6ee2e221a8c2473647b402d6;p=oweals%2Fbusybox.git ash: fix handling of bashism $'xxx' with high-bit chars. Closes 9236 Signed-off-by: Denys Vlasenko --- 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) 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; } }