summaryrefslogtreecommitdiff
path: root/lib/libc/net/rcmd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-22 04:31:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-05-22 04:31:15 +0000
commit5573bad6dd4166c4d5c21505821c56409b0bdff2 (patch)
tree7c02dab6656c3848eed19758ae2fb5a0b6414885 /lib/libc/net/rcmd.c
parent5e752c340115e9d13eac8a213e6c529f549303ab (diff)
more strlcpy and snprintf
Diffstat (limited to 'lib/libc/net/rcmd.c')
-rw-r--r--lib/libc/net/rcmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c
index 143b667ba8e..d6814676f4e 100644
--- a/lib/libc/net/rcmd.c
+++ b/lib/libc/net/rcmd.c
@@ -34,7 +34,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rcmd.c,v 1.41 2002/02/17 19:42:23 millert Exp $";
+static char *rcsid = "$OpenBSD: rcmd.c,v 1.42 2002/05/22 04:31:14 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -175,7 +175,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
hbuf[0] = '\0';
if (getnameinfo(r->ai_addr, r->ai_addrlen,
hbuf, sizeof(hbuf), NULL, 0, niflags) != 0)
- strcpy(hbuf, "(invalid)");
+ strlcpy(hbuf, "(invalid)", sizeof hbuf);
(void)fprintf(stderr, "connect to address %s: ", hbuf);
errno = oerrno;
perror(0);
@@ -183,7 +183,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
hbuf[0] = '\0';
if (getnameinfo(r->ai_addr, r->ai_addrlen,
hbuf, sizeof(hbuf), NULL, 0, niflags) != 0)
- strcpy(hbuf, "(invalid)");
+ strlcpy(hbuf, "(invalid)", sizeof hbuf);
(void)fprintf(stderr, "Trying %s...\n", hbuf);
continue;
}