← Commit list

9ee589279

Denys Vlasenko
Denys Vlasenko
2020-02-17
SUCCESS Duration: 152s

Subject

ash: expand: Fix trailing newlines processing in backquote expanding

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
@@ -6578,7 +6578,7 @@ expbackq(union node *cmd, int flag)
/* Eat all trailing newlines */
dest = expdest;
- for (; dest > (char *)stackblock() && dest[-1] == '\n';)
+ for (; dest > ((char *)stackblock() + startloc) && dest[-1] == '\n';)
STUNPUTC(dest);
expdest = dest;
shell/ash_test/ash-psubst/tick_in_heredoc.right+5 -0
@@ -0,0 +1,5 @@
+1
+
+2
+
+3
shell/ash_test/ash-psubst/tick_in_heredoc.tests+7 -0
@@ -0,0 +1,7 @@
+cat <<END
+1
+$(echo "")
+2
+`echo ""`
+3
+END
shell/hush_test/hush-psubst/tick_in_heredoc.right+5 -0
@@ -0,0 +1,5 @@
+1
+
+2
+
+3
shell/hush_test/hush-psubst/tick_in_heredoc.tests+7 -0
@@ -0,0 +1,7 @@
+cat <<END
+1
+$(echo "")
+2
+`echo ""`
+3
+END