From 93b61bf0d392ca1e6f923d6fc252cb9778ab5ce2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 20 Aug 2004 09:11:52 +0000 Subject: [PATCH] use inet_pton() correctly! --- lib/hostip6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hostip6.c b/lib/hostip6.c index 596a5733d..d01c4476e 100644 --- a/lib/hostip6.c +++ b/lib/hostip6.c @@ -247,7 +247,7 @@ Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, } } - if(1 == inet_pton(pf, addrbuf, sizeof(addrbuf))) { + if(1 == inet_pton(pf, hostname, addrbuf)) { /* the given address is numerical only, prevent a reverse lookup */ ai_flags = AI_NUMERICHOST; }