toolbox ps: replace strcpy with snprintf.
Change-Id: I0fdf9a8d5ab15bcff06cca3f3e7024ab76b219d9
This commit is contained in:
parent
3b9ba98e9e
commit
defd249d3d
1 changed files with 1 additions and 1 deletions
|
|
@ -151,7 +151,7 @@ static int ps_line(int pid, int tid)
|
|||
if (pw == 0 || (display_flags & SHOW_NUMERIC_UID)) {
|
||||
snprintf(user, sizeof(user), "%d", (int)stats.st_uid);
|
||||
} else {
|
||||
strcpy(user, pw->pw_name);
|
||||
snprintf(user, sizeof(user), "%s", pw->pw_name);
|
||||
}
|
||||
|
||||
if (ppid_filter != 0 && ppid != ppid_filter) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue