busybox/shell/hush_test/hush-psubst/emptytick.tests
Mike Frysinger 28736c36ca 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>
2009-10-18 01:15:36 -04:00

17 lines
312 B
Plaintext
Executable File

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 $?