← Commit list

c4c201228

Denys Vlasenko
Denys Vlasenko
2018-04-02
SUCCESS Duration: 141s

Subject

ash: parser: Fix single-quoted patterns in here-documents

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
@@ -12005,7 +12005,7 @@ readtoken1(int c, int syntax, char *eofmark, int striptabs)
}
}
#endif
- if (eofmark == NULL || synstack->dblquote)
+ if (!eofmark || synstack->dblquote || synstack->varnest)
USTPUTC(CTLESC, out);
USTPUTC(c, out);
break;
shell/ash_test/ash-heredoc/heredoc_var_expand1.right+4 -0
@@ -0,0 +1,4 @@
+
+Ok1:0
+
+Ok2:0
shell/ash_test/ash-heredoc/heredoc_var_expand1.tests+11 -0
@@ -0,0 +1,11 @@
+x='*'
+
+cat <<- EOF
+ ${x#'*'}
+EOF
+echo Ok1:$?
+
+cat <<EOF
+${x#'*'}
+EOF
+echo Ok2:$?