summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.bin/banner/banner.c4
-rw-r--r--usr.bin/limits/limits.c2
-rw-r--r--usr.bin/rpcinfo/rpcinfo.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/banner/banner.c b/usr.bin/banner/banner.c
index b363f72..0812aed 100644
--- a/usr.bin/banner/banner.c
+++ b/usr.bin/banner/banner.c
@@ -1064,8 +1064,8 @@ main(int argc, char *argv[])
err(1, "malloc");
strcpy(message, *argv);
while (*++argv) {
- strcat(message, " ");
- strcat(message, *argv);
+ strlcat(message, " ", j);
+ strlcat(message, *argv, j);
}
nchars = strlen(message);
} else {
diff --git a/usr.bin/limits/limits.c b/usr.bin/limits/limits.c
index 3c5fd6d..af4a4ed 100644
--- a/usr.bin/limits/limits.c
+++ b/usr.bin/limits/limits.c
@@ -549,7 +549,7 @@ print_limit(rlim_t limit, unsigned divisor, const char * inf, const char * pfx,
char numbr[64];
if (limit == RLIM_INFINITY)
- strcpy(numbr, inf);
+ strlcpy(numbr, inf, sizeof(numbr));
else
sprintf(numbr, "%jd", (intmax_t)((limit + divisor/2) / divisor));
printf(pfx, which, numbr);
diff --git a/usr.bin/rpcinfo/rpcinfo.c b/usr.bin/rpcinfo/rpcinfo.c
index 884f80d..6524df4 100644
--- a/usr.bin/rpcinfo/rpcinfo.c
+++ b/usr.bin/rpcinfo/rpcinfo.c
@@ -854,9 +854,9 @@ failed:
printf("%-10s", buf);
buf[0] = '\0';
for (nl = rs->nlist; nl; nl = nl->next) {
- strcat(buf, nl->netid);
+ strlcat(buf, nl->netid, sizeof(buf));
if (nl->next)
- strcat(buf, ",");
+ strlcat(buf, ",", sizeof(buf));
}
printf("%-32s", buf);
rpc = getrpcbynumber(rs->prog);
OpenPOWER on IntegriCloud