diff options
author | Denys Vlasenko | 2009-09-12 00:15:34 +0200 |
---|---|---|
committer | Denys Vlasenko | 2009-09-12 00:15:34 +0200 |
commit | 3a0f6f23286ad4352830613c6a8aea1bd56ca2d2 (patch) | |
tree | 6781fe0614bf8a544550535abca7897468bae970 /procps/ps.c | |
parent | ae357bd7138a179a1433b7d6e1aca48cc6438966 (diff) | |
download | busybox-3a0f6f23286ad4352830613c6a8aea1bd56ca2d2.zip busybox-3a0f6f23286ad4352830613c6a8aea1bd56ca2d2.tar.gz |
fix read_cmdline API and a small buglet where "[comm]" may be too narrow
function old new delta
func_args 25 26 +1
read_cmdline 119 114 -5
display_process_list 1462 1447 -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 1/-20) Total: -19 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps/ps.c')
-rw-r--r-- | procps/ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/procps/ps.c b/procps/ps.c index 4a6b60b..6523f0f 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -186,7 +186,7 @@ static void func_comm(char *buf, int size, const procps_status_t *ps) static void func_args(char *buf, int size, const procps_status_t *ps) { - read_cmdline(buf, size, ps->pid, ps->comm); + read_cmdline(buf, size+1, ps->pid, ps->comm); } static void func_pid(char *buf, int size, const procps_status_t *ps) |