]> granicus.if.org Git - curl/commitdiff
extract IPv6-style specified IP-addresses properly
authorDaniel Stenberg <daniel@haxx.se>
Wed, 15 Aug 2001 21:40:09 +0000 (21:40 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 15 Aug 2001 21:40:09 +0000 (21:40 +0000)
lib/url.c

index edbbf7b41d709df0cdf9d9e7f9196c3355b0cfc2..afd66a4c7a88051a048f273d349008720f16d546 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1996,7 +1996,10 @@ static CURLcode Connect(struct UrlData *data,
     failf(data, "You haven't enabled IPv6 support");
     return CURLE_URL_MALFORMAT;
 #else
+    conn->name++; /* pass the starting bracket */
+
     tmp = strchr(conn->name, ']');
+    *tmp = 0; /* zero terminate */
 
     tmp++; /* pass the ending bracket */
     if(':' != *tmp)