aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/ps.c2
-rw-r--r--procps/top.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/procps/ps.c b/procps/ps.c
index 4a6b60bdc..6523f0f38 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)
diff --git a/procps/top.c b/procps/top.c
index 92360a005..7133e5c99 100644
--- a/procps/top.c
+++ b/procps/top.c
@@ -617,7 +617,7 @@ static NOINLINE void display_process_list(int lines_rem, int scr_width)
#endif
);
if ((int)(col + 1) < scr_width)
- read_cmdline(line_buf + col, scr_width - col - 1, s->pid, s->comm);
+ read_cmdline(line_buf + col, scr_width - col, s->pid, s->comm);
fputs(line_buf, stdout);
/* printf(" %d/%d %lld/%lld", s->pcpu, total_pcpu,
cur_jif.busy - prev_jif.busy, cur_jif.total - prev_jif.total); */