From a8041047f4c21c83341bfd1f7cc5c111dd76e0db Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 17 Jun 2003 19:09:50 +0000 Subject: Patch from Ronald Wahl fixing an IPV6 specific problem with getaddrinfo(). --- libc/inet/resolv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index fee539c39..6083bad57 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1894,8 +1894,8 @@ int gethostbyaddr_r (const void *addr, socklen_t len, int type, qp+=sizeof(*addr_list6)*2; plen-=sizeof(*addr_list6)*2; - if (len < buflen) { - buflen=len; + if (plen < buflen) { + buflen=plen; buf=qp; } #endif /* __UCLIBC_HAS_IPV6__ */ -- cgit v1.2.3