Index: head/usr.bin/banner/banner.c =================================================================== --- head/usr.bin/banner/banner.c +++ head/usr.bin/banner/banner.c @@ -1064,8 +1064,8 @@ err(1, "malloc"); strcpy(message, *argv); while (*++argv) { - strcat(message, " "); - strcat(message, *argv); + strlcat(message, " ", j); + strlcat(message, *argv, j); } nchars = strlen(message); } else { Index: head/usr.bin/fortune/strfile/strfile.c =================================================================== --- head/usr.bin/fortune/strfile/strfile.c +++ head/usr.bin/fortune/strfile/strfile.c @@ -303,8 +303,8 @@ usage(); } if (*Outfile == '\0') { - strcpy(Outfile, Infile); - strcat(Outfile, ".dat"); + strlcpy(Outfile, Infile, sizeof(Outfile)); + strlcat(Outfile, ".dat", sizeof(Outfile)); } } Index: head/usr.bin/limits/limits.c =================================================================== --- head/usr.bin/limits/limits.c +++ head/usr.bin/limits/limits.c @@ -561,7 +561,7 @@ 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); Index: head/usr.bin/rpcinfo/rpcinfo.c =================================================================== --- head/usr.bin/rpcinfo/rpcinfo.c +++ head/usr.bin/rpcinfo/rpcinfo.c @@ -856,9 +856,9 @@ 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);