This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH][BZ 19369] resolv: Reset defdname before use in __res_vinit (bug 19369)
- From: Rob Wu <rob at robwu dot nl>
- To: libc-alpha at sourceware dot org
- Cc: Rob Wu <rob at robwu dot nl>
- Date: Wed, 16 Dec 2015 12:53:27 +0100
- Subject: [PATCH][BZ 19369] resolv: Reset defdname before use in __res_vinit (bug 19369)
- Authentication-results: sourceware.org; auth=none
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 | 5 +++++
resolv/res_init.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 8fd2d96..a0efb88 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-12-16 Rob Wu <rob@robwu.nl>
+
+ [BZ #19369]
+ * resolv/res_init.c (__res_vinit): Reset defdname before use.
+
2015-12-15 H.J. Lu <hongjiu.lu@intel.com>
[BZ #19367]
diff --git a/resolv/res_init.c b/resolv/res_init.c
index c5dc801..e0b6a80 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;
--
2.6.2