summary refs log tree commit diff
path: root/resolv
diff options
context:
space:
mode:
authorRob Wu <rob@robwu.nl>2015-12-16 12:53:27 +0100
committerMike Frysinger <vapier@gentoo.org>2015-12-29 13:28:04 -0500
commitb674b821091141c5eed7d423612d3b10703e9c62 (patch)
tree7da637b96788280ce05389ce4529399d0da02249 /resolv
parentd51442aacdbdb63e2f10815d843b551a9291d7a5 (diff)
downloadglibc-b674b821091141c5eed7d423612d3b10703e9c62.tar.gz
glibc-b674b821091141c5eed7d423612d3b10703e9c62.tar.xz
glibc-b674b821091141c5eed7d423612d3b10703e9c62.zip
resolv: Reset defdname before use in __res_vinit [BZ #19369]
Resetting defdname (default domain name) before use in __res_vinit
ensures that the default domain name is correctly set to a default
value when it is not set by the LOCALDOMAIN environment variable or
the "domain" or "search" parameters in resolv.conf

Tested using the steps from:
https://sourceware.org/bugzilla/show_bug.cgi?id=19369
Diffstat (limited to 'resolv')
-rw-r--r--resolv/res_init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/resolv/res_init.c b/resolv/res_init.c
index c5dc801937..e0b6a80dc7 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -176,6 +176,7 @@ __res_vinit(res_state statp, int preinit) {
 	}
 
 	statp->nscount = 0;
+	statp->defdname[0] = '\0';
 	statp->ndots = 1;
 	statp->pfcode = 0;
 	statp->_vcsock = -1;