summaryrefslogtreecommitdiffstats
path: root/usr.bin/rpcinfo/rpcinfo.c
diff options
context:
space:
mode:
authorasomers <asomers@FreeBSD.org>2017-05-30 21:58:53 +0000
committerasomers <asomers@FreeBSD.org>2017-05-30 21:58:53 +0000
commitfe7db465cf51455c45eb1cc959074452fcb769ee (patch)
tree5742a211f85eecdcbe6d870fee472ceb69c460bd /usr.bin/rpcinfo/rpcinfo.c
parent5389fea22fde348efc5195a1311aa4ff9fa22e9b (diff)
downloadFreeBSD-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.c4
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);
OpenPOWER on IntegriCloud