summaryrefslogtreecommitdiff
path: root/libc/inet/resolv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/inet/resolv.c')
-rw-r--r--libc/inet/resolv.c4
1 files 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__ */