diff options
Diffstat (limited to 'bin/ps')
-rw-r--r-- | bin/ps/keyword.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/ps/keyword.c b/bin/ps/keyword.c index a80b8ed3..9ae82c3 100644 --- a/bin/ps/keyword.c +++ b/bin/ps/keyword.c @@ -314,9 +314,7 @@ findvar(char *p, int user, char **header) */ rflen = strlen(v->alias) + strlen(hp) + 2; realfmt = malloc(rflen); - strlcpy(realfmt, v->alias, rflen); - strlcat(realfmt, "=", rflen); - strlcat(realfmt, hp, rflen); + snprintf(realfmt, rflen, "%s=%s", v->alias, hp); parsefmt(realfmt, user); return ((VAR *)NULL); } |