From: Denys Vlasenko Date: Sat, 12 Mar 2011 05:08:28 +0000 (+0100) Subject: busybox: fail if --install is not given an absolute path X-Git-Tag: 1_19_0~228 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5c942713b7369d239b1303c0cfc7049d898564d4;p=oweals%2Fbusybox.git busybox: fail if --install is not given an absolute path Signed-off-by: Denys Vlasenko --- diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 69cac2e9a..fc84d36ec 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c @@ -721,10 +721,9 @@ static int busybox_main(char **argv) * In such case, better use argv[0] as symlink target * if it is a full path name. */ - if (argv[0][0] == '/') - busybox = argv[0]; - else - busybox = bb_busybox_exec_path; + if (argv[0][0] != '/') + bb_error_msg_and_die("'%s' is not an absolute path", argv[0]); + busybox = argv[0]; } /* busybox --install [-s] [DIR]: * -s: make symlinks