ash: fix handling of bashism $'xxx' with high-bit chars. Closes 9236

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
1_26_stable
Denys Vlasenko 2016-09-20 17:04:09 +02:00
parent d6a37d86ba
commit 244fdd45c7
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}
}