summaryrefslogtreecommitdiff
path: root/src/lib/libc/net/ipx_addr.c
diff options
context:
space:
mode:
authorlebel <>2001-06-27 00:58:56 +0000
committerlebel <>2001-06-27 00:58:56 +0000
commitba6f70d7550cc513151c4bb719659d4775a9efff (patch)
tree267e8c115af6744d1fab5a015c06458ba2befdab /src/lib/libc/net/ipx_addr.c
parentc18bed276b8f6877a6111a6c03185f0025220031 (diff)
downloadopenbsd-ba6f70d7550cc513151c4bb719659d4775a9efff.tar.gz
openbsd-ba6f70d7550cc513151c4bb719659d4775a9efff.tar.bz2
openbsd-ba6f70d7550cc513151c4bb719659d4775a9efff.zip
use strlcpy vs strncpy+a[len-1]='\0'. millert@ ok.
Diffstat (limited to 'src/lib/libc/net/ipx_addr.c')
-rw-r--r--src/lib/libc/net/ipx_addr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libc/net/ipx_addr.c b/src/lib/libc/net/ipx_addr.c
index 9c9fe651cd..0d225e281b 100644
--- a/src/lib/libc/net/ipx_addr.c
+++ b/src/lib/libc/net/ipx_addr.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#if defined(LIBC_SCCS) && !defined(lint) 39#if defined(LIBC_SCCS) && !defined(lint)
40static char rcsid[] = "$OpenBSD: ipx_addr.c,v 1.4 2001/01/04 21:45:30 todd Exp $"; 40static char rcsid[] = "$OpenBSD: ipx_addr.c,v 1.5 2001/06/27 00:58:55 lebel Exp $";
41#endif /* LIBC_SCCS and not lint */ 41#endif /* LIBC_SCCS and not lint */
42 42
43#include <sys/param.h> 43#include <sys/param.h>
@@ -57,8 +57,7 @@ ipx_addr(name)
57 char *hostname, *socketname, *cp; 57 char *hostname, *socketname, *cp;
58 char buf[50]; 58 char buf[50];
59 59
60 (void)strncpy(buf, name, sizeof(buf) - 1); 60 strlcpy(buf, name, sizeof(buf));
61 buf[sizeof(buf) - 1] = '\0';
62 61
63 /* 62 /*
64 * First, figure out what he intends as a field separtor. 63 * First, figure out what he intends as a field separtor.