diff options
author | Elliott Hughes | 2016-04-30 00:10:40 -0500 |
---|---|---|
committer | Elliott Hughes | 2016-04-30 00:10:40 -0500 |
commit | defd249d3d54f6e86919ace8ea44934138aa1fb8 (patch) | |
tree | 07442d117d248d5be59a52a3fd49a9a45ff6f40c /toolbox | |
parent | 3b9ba98e9eda85baa6f08409177fd1f23307b2d0 (diff) | |
download | platform-system-core-defd249d3d54f6e86919ace8ea44934138aa1fb8.tar.gz platform-system-core-defd249d3d54f6e86919ace8ea44934138aa1fb8.tar.xz platform-system-core-defd249d3d54f6e86919ace8ea44934138aa1fb8.zip |
toolbox ps: replace strcpy with snprintf.
Change-Id: I0fdf9a8d5ab15bcff06cca3f3e7024ab76b219d9
Diffstat (limited to 'toolbox')
-rw-r--r-- | toolbox/ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/toolbox/ps.c b/toolbox/ps.c index 3b3c8a1ae..c1291101c 100644 --- a/toolbox/ps.c +++ b/toolbox/ps.c | |||
@@ -151,7 +151,7 @@ static int ps_line(int pid, int tid) | |||
151 | if (pw == 0 || (display_flags & SHOW_NUMERIC_UID)) { | 151 | if (pw == 0 || (display_flags & SHOW_NUMERIC_UID)) { |
152 | snprintf(user, sizeof(user), "%d", (int)stats.st_uid); | 152 | snprintf(user, sizeof(user), "%d", (int)stats.st_uid); |
153 | } else { | 153 | } else { |
154 | strcpy(user, pw->pw_name); | 154 | snprintf(user, sizeof(user), "%s", pw->pw_name); |
155 | } | 155 | } |
156 | 156 | ||
157 | if (ppid_filter != 0 && ppid != ppid_filter) { | 157 | if (ppid_filter != 0 && ppid != ppid_filter) { |