Merge "toolbox ps: replace strcpy with snprintf."
am: b9ce0f10f3
* commit 'b9ce0f10f38c74b468c4bc512b3cc82c4bba0e1b':
toolbox ps: replace strcpy with snprintf.
Change-Id: I7819d42e1780f9bab14bdfee882a074f3677df00
diff --git a/toolbox/ps.c b/toolbox/ps.c
index 3b3c8a1..c129110 100644
--- a/toolbox/ps.c
+++ b/toolbox/ps.c
@@ -151,7 +151,7 @@
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) {