aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-02-03 13:37:58 -0600
committerRob Landley <rob@landley.net>2019-02-03 13:37:58 -0600
commit354cc6aa0cf9f6d62dd879c4ab5a2c08257d76ed (patch)
tree99986393756985068c3bcf9ecf8075b3e7965616 /lib
parentac617315854d7985105a6cf341a5c0153fe3e35d (diff)
downloadtoybox-354cc6aa0cf9f6d62dd879c4ab5a2c08257d76ed.tar.gz
William Djupström pointed out that xexec() lost the absolute path check.
Diffstat (limited to 'lib')
-rw-r--r--lib/xwrap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 04a4cae3..08b814f1 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -207,7 +207,8 @@ pid_t __attribute__((returns_twice)) xvforkwrap(pid_t pid)
void xexec(char **argv)
{
// Only recurse to builtin when we have multiplexer and !vfork context.
- if (CFG_TOYBOX && !CFG_TOYBOX_NORECURSE && toys.stacktop) toy_exec(argv);
+ if (CFG_TOYBOX && !CFG_TOYBOX_NORECURSE && toys.stacktop && **argv != '/')
+ toy_exec(argv);
execvp(argv[0], argv);
perror_msg("exec %s", argv[0]);