diff options
author | 2013-03-29 22:51:35 +0000 | |
---|---|---|
committer | 2013-03-29 22:51:35 +0000 | |
commit | 368b4e6a0c984e3f740e5d6682cb7f45d3f392aa (patch) | |
tree | 17f5b88ab1a6a579017c8de8fa7dc48c71b32c7a /lib/libc | |
parent | correctly show the scope for IPv6 addresses in getnameinfo() (diff) | |
download | wireguard-openbsd-368b4e6a0c984e3f740e5d6682cb7f45d3f392aa.tar.xz wireguard-openbsd-368b4e6a0c984e3f740e5d6682cb7f45d3f392aa.zip |
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/libc')
-rw-r--r-- | lib/libc/asr/res_mkquery.c | 4 |
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) { |