From 38f8ca9fa51b59794faf1c8ca4e9b1b7c06eeb42 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Thu, 25 Jul 2002 21:13:45 +0000 Subject: kill more strcpy --- src/lib/libc/net/res_init.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/libc/net/res_init.c') diff --git a/src/lib/libc/net/res_init.c b/src/lib/libc/net/res_init.c index 099aa04e30..c55c7763a4 100644 --- a/src/lib/libc/net/res_init.c +++ b/src/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'; -- cgit v1.2.3-55-g6feb