← Commit list

78c9c736a

Denys Vlasenko
Denys Vlasenko
2016-09-29
SUCCESS Duration: 270s

Subject

hush: fix 'eval ""' handling

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_test/ash-misc/eval2.right+3 -0
@@ -0,0 +1,3 @@
+Zero:0
+Zero:0
+Zero:0
shell/ash_test/ash-misc/eval2.tests+4 -0
@@ -0,0 +1,4 @@
+false; eval; echo Zero:$?
+false; eval ""; echo Zero:$?
+false; eval "
+"; echo Zero:$?
shell/hush.c+1 -1
@@ -5679,7 +5679,7 @@ static char* expand_strvec_to_string(char **argv)
n++;
}
}
- overlapping_strcpy((char*)list, list[0]);
+ overlapping_strcpy((char*)list, list[0] ? list[0] : "");
debug_printf_expand("strvec_to_string='%s'\n", (char*)list);
return (char*)list;
}
shell/hush_test/hush-misc/eval2.right+3 -0
@@ -0,0 +1,3 @@
+Zero:0
+Zero:0
+Zero:0
shell/hush_test/hush-misc/eval2.tests+4 -0
@@ -0,0 +1,4 @@
+false; eval; echo Zero:$?
+false; eval ""; echo Zero:$?
+false; eval "
+"; echo Zero:$?