From fbd0c53e9efe71117be7d0e9f14198fa7de2d9a2 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 7 May 2020 12:24:27 +0200 Subject: urlapi: accept :: as a valid IPv6 address Reported-by: Pavel Volgarev Fixes #5344 --- lib/urlapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/urlapi.c') diff --git a/lib/urlapi.c b/lib/urlapi.c index 506e244dc..37937fbca 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -606,7 +606,7 @@ static CURLUcode hostname_check(struct Curl_URL *u, char *hostname) char dest[16]; /* fits a binary IPv6 address */ #endif const char *l = "0123456789abcdefABCDEF:."; - if(hlen < 5) /* '[::1]' is the shortest possible valid string */ + if(hlen < 4) /* '[::]' is the shortest possible valid string */ return CURLUE_MALFORMED_INPUT; hostname++; hlen -= 2; -- cgit v1.2.1