diff options
author | deraadt <> | 2002-07-25 21:13:45 +0000 |
---|---|---|
committer | deraadt <> | 2002-07-25 21:13:45 +0000 |
commit | 38f8ca9fa51b59794faf1c8ca4e9b1b7c06eeb42 (patch) | |
tree | fd08b36ec9599d78879914d7983488f0e1e5155e /src/lib/libc/net/gethostnamadr.c | |
parent | f60b3a80fab33686119eda8629a7cbe8319cc074 (diff) | |
download | openbsd-38f8ca9fa51b59794faf1c8ca4e9b1b7c06eeb42.tar.gz openbsd-38f8ca9fa51b59794faf1c8ca4e9b1b7c06eeb42.tar.bz2 openbsd-38f8ca9fa51b59794faf1c8ca4e9b1b7c06eeb42.zip |
kill more strcpy
Diffstat (limited to 'src/lib/libc/net/gethostnamadr.c')
-rw-r--r-- | src/lib/libc/net/gethostnamadr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/net/gethostnamadr.c b/src/lib/libc/net/gethostnamadr.c index 3049d576e1..f1aa448670 100644 --- a/src/lib/libc/net/gethostnamadr.c +++ b/src/lib/libc/net/gethostnamadr.c | |||
@@ -52,7 +52,7 @@ | |||
52 | */ | 52 | */ |
53 | 53 | ||
54 | #if defined(LIBC_SCCS) && !defined(lint) | 54 | #if defined(LIBC_SCCS) && !defined(lint) |
55 | static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.48 2002/06/26 06:00:53 itojun Exp $"; | 55 | static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.49 2002/07/25 21:13:45 deraadt Exp $"; |
56 | #endif /* LIBC_SCCS and not lint */ | 56 | #endif /* LIBC_SCCS and not lint */ |
57 | 57 | ||
58 | #include <sys/param.h> | 58 | #include <sys/param.h> |
@@ -614,7 +614,7 @@ gethostbyname2(name, af) | |||
614 | 614 | ||
615 | bcopy(_res.lookups, lookups, sizeof lookups); | 615 | bcopy(_res.lookups, lookups, sizeof lookups); |
616 | if (lookups[0] == '\0') | 616 | if (lookups[0] == '\0') |
617 | strncpy(lookups, "bf", sizeof lookups); | 617 | strlcpy(lookups, "bf", sizeof lookups); |
618 | 618 | ||
619 | hp = (struct hostent *)NULL; | 619 | hp = (struct hostent *)NULL; |
620 | for (i = 0; i < MAXDNSLUS && hp == NULL && lookups[i]; i++) { | 620 | for (i = 0; i < MAXDNSLUS && hp == NULL && lookups[i]; i++) { |
@@ -719,7 +719,7 @@ gethostbyaddr(addr, len, af) | |||
719 | 719 | ||
720 | bcopy(_res.lookups, lookups, sizeof lookups); | 720 | bcopy(_res.lookups, lookups, sizeof lookups); |
721 | if (lookups[0] == '\0') | 721 | if (lookups[0] == '\0') |
722 | strncpy(lookups, "bf", sizeof lookups); | 722 | strlcpy(lookups, "bf", sizeof lookups); |
723 | 723 | ||
724 | hp = (struct hostent *)NULL; | 724 | hp = (struct hostent *)NULL; |
725 | for (i = 0; i < MAXDNSLUS && hp == NULL && lookups[i]; i++) { | 725 | for (i = 0; i < MAXDNSLUS && hp == NULL && lookups[i]; i++) { |