This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug network/19994] New: getaddrinfo does not restore RES_USE_INET6 flag in gethosts
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 26 Apr 2016 12:14:09 +0000
- Subject: [Bug network/19994] New: getaddrinfo does not restore RES_USE_INET6 flag in gethosts
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19994
Bug ID: 19994
Summary: getaddrinfo does not restore RES_USE_INET6 flag in
gethosts
Product: glibc
Version: 2.24
Status: NEW
Severity: normal
Priority: P3
Component: network
Assignee: unassigned at sourceware dot org
Reporter: fweimer at redhat dot com
Target Milestone: ---
Flags: security-
getaddrinfo clears the RES_USE_INET6 flag.
/* If we are looking for both IPv4 and IPv6 address we don't
want the lookup functions to automatically promote IPv4
addresses to IPv6 addresses. Currently this is decided
by setting the RES_USE_INET6 bit in _res.options. */
old_res_options = _res.options;
_res.options &= ~RES_USE_INET6;
However, in case of a memory allocation failure in the gethosts macro,
_res.options is not restored prior to the jump to the free_and_return label.
--
You are receiving this mail because:
You are on the CC list for the bug.