summaryrefslogtreecommitdiff
path: root/usr.bin/finger
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-13 15:47:13 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-13 15:47:13 +0000
commit1e46612221e29a3f44b51938a54918044e96afd0 (patch)
tree2117e55710cb70b7cc4f387766cc0e5d2ecf9ae2 /usr.bin/finger
parenta50175212238135f4447473edea4d8c46290faa2 (diff)
a few more strlcpy
Diffstat (limited to 'usr.bin/finger')
-rw-r--r--usr.bin/finger/net.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/finger/net.c b/usr.bin/finger/net.c
index 1329c2e309c..d4cdddb61f4 100644
--- a/usr.bin/finger/net.c
+++ b/usr.bin/finger/net.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: net.c,v 1.7 1999/12/11 10:05:04 itojun Exp $ */
+/* $OpenBSD: net.c,v 1.8 2003/03/13 15:47:10 deraadt Exp $ */
/*
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
#ifndef lint
/*static char sccsid[] = "from: @(#)net.c 5.5 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$OpenBSD: net.c,v 1.7 1999/12/11 10:05:04 itojun Exp $";
+static char rcsid[] = "$OpenBSD: net.c,v 1.8 2003/03/13 15:47:10 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -102,8 +102,8 @@ netfinger(name)
/* have network connection; identify the host connected with */
if (getnameinfo(res->ai_addr, res->ai_addrlen, hbuf, sizeof(hbuf),
- NULL, 0, NI_NUMERICHOST) != 0) {
- strcpy(hbuf, "(invalid)");
+ NULL, 0, NI_NUMERICHOST) != 0) {
+ strlcpy(hbuf, "(invalid)", sizeof hbuf);
}
(void)printf("[%s/%s]\n", host, hbuf);