diff options
author | sandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-07-19 00:05:54 +0000 |
---|---|---|
committer | sandman <sandman@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2002-07-19 00:05:54 +0000 |
commit | 88c37e3b6514ce684e6f5f38282176f34fc73d0d (patch) | |
tree | 945ff88bbbde5a32c2b3342b22d801be90ea40f2 /libbb/run_shell.c | |
parent | d4dbffaf02bf1c39047688988c44c8d60277a76a (diff) | |
download | busybox-w32-88c37e3b6514ce684e6f5f38282176f34fc73d0d.tar.gz busybox-w32-88c37e3b6514ce684e6f5f38282176f34fc73d0d.tar.bz2 busybox-w32-88c37e3b6514ce684e6f5f38282176f34fc73d0d.zip |
Applied vodz' patches #49 and #50 (with a small correction in runshell.c)
#49: I found one memory overflow and memory leak in "ln" applet.
Last patch reduced also 54 bytes. ;)
#50: I found bug in loginutils/Makefile.in.
New patch have also new function to libbb and
aplied this to applets and other cosmetic changes.
git-svn-id: svn://busybox.net/trunk/busybox@5066 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb/run_shell.c')
-rw-r--r-- | libbb/run_shell.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libbb/run_shell.c b/libbb/run_shell.c index 30050fecb..b26eba115 100644 --- a/libbb/run_shell.c +++ b/libbb/run_shell.c | |||
@@ -60,9 +60,8 @@ void run_shell ( const char *shell, int loginshell, const char *command, const c | |||
60 | args [0] = get_last_path_component ( xstrdup ( shell )); | 60 | args [0] = get_last_path_component ( xstrdup ( shell )); |
61 | 61 | ||
62 | if ( loginshell ) { | 62 | if ( loginshell ) { |
63 | char *args0 = xmalloc ( xstrlen ( args [0] ) + 2 ); | 63 | char *args0; |
64 | args0 [0] = '-'; | 64 | bb_asprintf ( &args0, "-%s", args [0] ); |
65 | strcpy ( args0 + 1, args [0] ); | ||
66 | args [0] = args0; | 65 | args [0] = args0; |
67 | } | 66 | } |
68 | 67 | ||