← Commit list

84ba50c32

Ron Yorston
Ron Yorston
2016-04-15
SUCCESS Duration: 222s

Subject

ash: bash-compatible $'...' shouldn't expand in double quotes

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

shell/ash.c+1 -1
@@ -11500,7 +11500,7 @@ parsesub: {
|| (c != '(' && c != '{' && !is_name(c) && !is_special(c))
) {
#if ENABLE_ASH_BASH_COMPAT
- if (c == '\'')
+ if (syntax != DQSYNTAX && c == '\'')
bash_dollar_squote = 1;
else
#endif
shell/ash_test/ash-heredoc/heredoc4.right+1 -0
@@ -0,0 +1 @@
+'$'
shell/ash_test/ash-heredoc/heredoc4.tests+3 -0
@@ -0,0 +1,3 @@
+cat <<EOF
+'$'
+EOF
shell/ash_test/ash-quoting/dollar_squote_bash1.right+1 -0
@@ -1,4 +1,5 @@
a b
+$'a\tb'
a
b c
def
shell/ash_test/ash-quoting/dollar_squote_bash1.tests+1 -0
@@ -1,4 +1,5 @@
echo $'a\tb'
+echo "$'a\tb'"
echo $'a\nb' $'c\nd''ef'
echo $'a\'b' $'c\"d' $'e\\f'
echo $'a\63b' $'c\063b' $'e\0633f'