diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-25 21:13:46 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-25 21:13:46 +0000 |
commit | f25841e75fbcde2eb52dc5e8cd984c7f4f8c3884 (patch) | |
tree | 6bb95a6b3ea51e0ba258ec816b40a9971324ca29 /lib/libc/net/res_init.c | |
parent | 10698ffae217c1d43c63989ff9364610d79831f7 (diff) |
kill more strcpy
Diffstat (limited to 'lib/libc/net/res_init.c')
-rw-r--r-- | lib/libc/net/res_init.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/net/res_init.c b/lib/libc/net/res_init.c index 099aa04e306..c55c7763a4e 100644 --- a/lib/libc/net/res_init.c +++ b/lib/libc/net/res_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: res_init.c,v 1.26 2002/06/27 10:14:02 itojun Exp $ */ +/* $OpenBSD: res_init.c,v 1.27 2002/07/25 21:13:45 deraadt Exp $ */ /* * ++Copyright++ 1985, 1989, 1993 @@ -64,7 +64,7 @@ static char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; static char rcsid[] = "$From: res_init.c,v 8.7 1996/09/28 06:51:07 vixie Exp $"; #else -static char rcsid[] = "$OpenBSD: res_init.c,v 1.26 2002/06/27 10:14:02 itojun Exp $"; +static char rcsid[] = "$OpenBSD: res_init.c,v 1.27 2002/07/25 21:13:45 deraadt Exp $"; #endif #endif /* LIBC_SCCS and not lint */ @@ -211,7 +211,7 @@ res_init() _res.nscount = 1; _res.ndots = 1; _res.pfcode = 0; - strncpy(_res.lookups, "f", sizeof _res.lookups); + strlcpy(_res.lookups, "f", sizeof _res.lookups); /* Allow user to override the local domain definition */ if (issetugid() == 0 && (cp = getenv("LOCALDOMAIN")) != NULL) { @@ -253,7 +253,7 @@ res_init() line[sizeof(name) - 1] == '\t')) if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) { - strncpy(_res.lookups, "bf", sizeof _res.lookups); + strlcpy(_res.lookups, "bf", sizeof _res.lookups); /* read the config file */ buf[0] = '\0'; |