diff options
Diffstat (limited to 'libbb/procps.c')
-rw-r--r-- | libbb/procps.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index 3d335b3..71ad071 100644 --- a/libbb/procps.c +++ b/libbb/procps.c @@ -554,8 +554,7 @@ procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags) break; if (flags & PSSCAN_ARGVN) { sp->argv_len = n; - sp->argv0 = xmalloc(n + 1); - memcpy(sp->argv0, buf, n + 1); + sp->argv0 = xmemdup(buf, n + 1); /* sp->argv0[n] = '\0'; - buf has it */ } else { sp->argv_len = 0; |