From b674b821091141c5eed7d423612d3b10703e9c62 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Wed, 16 Dec 2015 12:53:27 +0100 Subject: 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 --- resolv/res_init.c | 1 + 1 file changed, 1 insertion(+) (limited to 'resolv') 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; -- cgit v1.1