From 1b4af1f8d821d3be0cb540e94f947841a967d70f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 11 Dec 2008 22:22:46 +0000 Subject: - Keshav Krity found out that libcurl failed to deal with dotted IPv6 addresses if they were very long (>39 letters) due to a too strict address validity parser. It now accepts addresses up to 45 bytes long. --- lib/url.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/url.c b/lib/url.c index 1cf8b08da..3e2b14e9d 100644 --- a/lib/url.c +++ b/lib/url.c @@ -3724,7 +3724,8 @@ static CURLcode parse_remote_port(struct SessionHandle *data, char *portptr; char endbracket; - if((1 == sscanf(conn->host.name, "[%*39[0123456789abcdefABCDEF:.%]%c", &endbracket)) && + if((1 == sscanf(conn->host.name, "[%*45[0123456789abcdefABCDEF:.%]%c", + &endbracket)) && (']' == endbracket)) { /* this is a RFC2732-style specified IP-address */ conn->bits.ipv6_ip = TRUE; -- cgit v1.2.1