forked from pool/glibc
Andreas Schwab
f99cf3ddb6
- abort-no-flush.patch: Don't close or flush stdio streams on abort (BZ #15436) - fix-locking-in-_IO_cleanup.patch: always do locking when accessing streams (bnc#796982, BZ #15142) - resolv-dont-ignore-second-answer.patch: don't ignore second answer from nameserver if the first one was empty (bnc#767266, BZ #13651) - ldd-system-interp.patch: Never try to execute the file in ldd (bnc#677787, BZ #16750) - check-pf-alloca.patch: Account for alloca use when collecting interface addresses (bnc#785041, BZ #16002) - powerpc-opt-power8.patch: two more POWER8 optimisations (bnc#866711, fate#315443) - getaddrinfo-uninit-result.patch: Fix use of half-initialized result in getaddrinfo when using nscd (bnc#867636, BZ #16743) OBS-URL: https://build.opensuse.org/request/show/227472 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=343
23 lines
846 B
Diff
23 lines
846 B
Diff
* sysdeps/posix/getaddrinfo.c (gaih_inet): Properly skip over
|
|
non-matching result from nscd.
|
|
|
|
Index: glibc-2.19/sysdeps/posix/getaddrinfo.c
|
|
===================================================================
|
|
--- glibc-2.19.orig/sysdeps/posix/getaddrinfo.c
|
|
+++ glibc-2.19/sysdeps/posix/getaddrinfo.c
|
|
@@ -710,6 +710,14 @@ gaih_inet (const char *name, const struc
|
|
struct gaih_addrtuple *addrfree = addrmem;
|
|
for (int i = 0; i < air->naddrs; ++i)
|
|
{
|
|
+ if (!((air->family[i] == AF_INET
|
|
+ && req->ai_family == AF_INET6
|
|
+ && (req->ai_flags & AI_V4MAPPED) != 0)
|
|
+ || req->ai_family == AF_UNSPEC
|
|
+ || air->family[i] == req->ai_family))
|
|
+ /* Skip over non-matching result. */
|
|
+ continue;
|
|
+
|
|
socklen_t size = (air->family[i] == AF_INET
|
|
? INADDRSZ : IN6ADDRSZ);
|
|
if (*pat == NULL)
|