summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2013-03-29 22:51:36 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2013-03-29 22:51:36 +0000
commita705bc0faddaa53f4783cb2af810ebb7f423762d (patch)
tree28d07e901da40695959e4e561f1747db962e5996 /lib
parent5bbb8fdba0cd7983e3ba23b851d7819cdd256279 (diff)
res_querydomain()'s code to terminate the domain with '.' had the assignment
flipped so that it always used a domain of ".." Heavy lifting by otto@ ok eric@ otto@ miod@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/asr/res_mkquery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/asr/res_mkquery.c b/lib/libc/asr/res_mkquery.c
index 21ac2b8534b..f5479d5c00c 100644
--- a/lib/libc/asr/res_mkquery.c
+++ b/lib/libc/asr/res_mkquery.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: res_mkquery.c,v 1.3 2012/11/24 15:12:48 eric Exp $ */
+/* $OpenBSD: res_mkquery.c,v 1.4 2013/03/29 22:51:35 guenther Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -89,9 +89,9 @@ res_querydomain(const char *name,
/* we really want domain to end with a dot for now */
if (domain && ((n = strlen(domain)) == 0 || domain[n - 1 ] != '.')) {
- domain = ndom;
strlcpy(ndom, domain, sizeof ndom);
strlcat(ndom, ".", sizeof ndom);
+ domain = ndom;
}
if (asr_make_fqdn(name, domain, fqdn, sizeof fqdn) == 0) {