diff options
author | Denys Vlasenko | 2017-08-03 03:29:32 +0200 |
---|---|---|
committer | Denys Vlasenko | 2017-08-03 03:29:32 +0200 |
commit | 819b47aa357c33bf84919495795b36f8c1faa3ac (patch) | |
tree | 7ba0ddb384c2e7fdf581989f66085b95a78e0976 /debianutils | |
parent | 39701204cfa0f261beb2dc056024634e4c3afd71 (diff) | |
download | busybox-819b47aa357c33bf84919495795b36f8c1faa3ac.zip busybox-819b47aa357c33bf84919495795b36f8c1faa3ac.tar.gz |
new NOFORKs: clear, nproc, tty, uname, arch, unlink, which
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'debianutils')
-rw-r--r-- | debianutils/which.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/debianutils/which.c b/debianutils/which.c index 3197dda..b31d618 100644 --- a/debianutils/which.c +++ b/debianutils/which.c @@ -12,7 +12,7 @@ //config: which is used to find programs in your PATH and //config: print out their pathnames. -//applet:IF_WHICH(APPLET(which, BB_DIR_USR_BIN, BB_SUID_DROP)) +//applet:IF_WHICH(APPLET_NOFORK(which, which, BB_DIR_USR_BIN, BB_SUID_DROP, which)) //kbuild:lib-$(CONFIG_WHICH) += which.o @@ -56,6 +56,8 @@ int which_main(int argc UNUSED_PARAM, char **argv) char *p; path = tmp = xstrdup(env_path); +//NOFORK FIXME: nested xmallocs (one is inside find_executable()) +//can leak memory on failure while ((p = find_executable(*argv, &tmp)) != NULL) { missing = 0; puts(p); |