From: Daniel Stenberg Date: Fri, 20 Aug 2004 09:11:52 +0000 (+0000) Subject: use inet_pton() correctly! X-Git-Tag: curl-7_12_2~180 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=93b61bf0d392ca1e6f923d6fc252cb9778ab5ce2;p=thirdparty%2Fcurl.git use inet_pton() correctly! --- diff --git a/lib/hostip6.c b/lib/hostip6.c index 596a5733d5..d01c4476e4 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; }