summaryrefslogtreecommitdiff
path: root/lib/libc/net/res_query.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/res_query.c')
-rw-r--r--lib/libc/net/res_query.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libc/net/res_query.c b/lib/libc/net/res_query.c
index 433e80f6482..db76821fc69 100644
--- a/lib/libc/net/res_query.c
+++ b/lib/libc/net/res_query.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_query.c,v 1.14 2001/06/11 10:06:01 itojun Exp $ */
+/* $OpenBSD: res_query.c,v 1.15 2001/06/27 00:58:55 lebel Exp $ */
/*
* ++Copyright++ 1988, 1993
@@ -60,7 +60,7 @@
static char sccsid[] = "@(#)res_query.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "$From: res_query.c,v 8.9 1996/09/22 00:13:28 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: res_query.c,v 1.14 2001/06/11 10:06:01 itojun Exp $";
+static char rcsid[] = "$OpenBSD: res_query.c,v 1.15 2001/06/27 00:58:55 lebel Exp $";
#endif
#endif /* LIBC_SCCS and not lint */
@@ -390,8 +390,8 @@ hostalias(name)
break;
for (cp2 = cp1 + 1; *cp2 && !isspace(*cp2); ++cp2)
;
- strncpy(abuf, cp1, sizeof(abuf) - 1);
- abuf[sizeof(abuf) - 1] = *cp2 = '\0';
+ *cp2 = '\0';
+ strlcpy(abuf, cp1, sizeof(abuf));
fclose(fp);
return (abuf);
}