]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
resolv: Reset defdname before use in __res_vinit [BZ #19369]
authorRob Wu <rob@robwu.nl>
Wed, 16 Dec 2015 11:53:27 +0000 (12:53 +0100)
committerMike Frysinger <vapier@gentoo.org>
Tue, 29 Dec 2015 18:28:04 +0000 (13:28 -0500)
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

ChangeLog
resolv/res_init.c

index c2c5af6e662c9c8e81b0ceec776cc3ebcff3101e..5135c0178570fe0a91f4636831933a77c6e33fa2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-29  Rob Wu  <rob@robwu.nl>
+
+       [BZ #19369]
+       * resolv/res_init.c (__res_vinit): Reset defdname before use.
+
 2015-12-29  John David Anglin  <danglin@gcc.gnu.org>
 
        [BZ #19270]
index c5dc80193794d01341a25e00c09dcb970493c0e8..e0b6a80dc7656c6a7565fd39d18aed74599a108c 100644 (file)
@@ -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;