hush: handle empty execs
Sometimes variable expansions yield empty strings, and if they happen to
be a command someone wants to run like `$foo`, then hush currently
segfaults. So handle `` and $().
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
diff --git a/shell/hush_test/hush-psubst/emptytick.tests b/shell/hush_test/hush-psubst/emptytick.tests
new file mode 100755
index 0000000..af3a183
--- /dev/null
+++ b/shell/hush_test/hush-psubst/emptytick.tests
@@ -0,0 +1,16 @@
+true; ``; echo $?
+false; ``; echo $?
+true; `""`; echo $?
+false; `""`; echo $?
+true; ` `; echo $?
+false; ` `; echo $?
+
+true; $(); echo $?
+false; $(); echo $?
+true; $(""); echo $?
+false; $(""); echo $?
+true; $( ); echo $?
+false; $( ); echo $?
+
+true; exec ''; echo $?
+false; exec ''; echo $?