diff options
author | asomers <asomers@FreeBSD.org> | 2017-05-30 21:58:53 +0000 |
---|---|---|
committer | asomers <asomers@FreeBSD.org> | 2017-05-30 21:58:53 +0000 |
commit | fe7db465cf51455c45eb1cc959074452fcb769ee (patch) | |
tree | 5742a211f85eecdcbe6d870fee472ceb69c460bd /usr.bin/rpcinfo/rpcinfo.c | |
parent | 5389fea22fde348efc5195a1311aa4ff9fa22e9b (diff) | |
download | FreeBSD-src-fe7db465cf51455c45eb1cc959074452fcb769ee.zip FreeBSD-src-fe7db465cf51455c45eb1cc959074452fcb769ee.tar.gz |
MFC r316500 (except the part to usr.bin/fortune)
strcpy => strlcpy, strcat => strlcat
Reported by: Coverity
CID: 1006703 978863 1006745 1347163
Reviewed by: cem
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D10192
Diffstat (limited to 'usr.bin/rpcinfo/rpcinfo.c')
-rw-r--r-- | usr.bin/rpcinfo/rpcinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |