Skip to content

Commit

Permalink
resolv: Reset defdname before use in __res_vinit [BZ #19369]
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rob Wu authored and Mike Frysinger committed Dec 29, 2015
1 parent d51442a commit b674b82
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
1 change: 1 addition & 0 deletions resolv/res_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b674b82

Please sign in to comment.