summaryrefslogtreecommitdiff
path: root/lib/urlapi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-07 12:24:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-07 12:24:27 +0200
commitfbd0c53e9efe71117be7d0e9f14198fa7de2d9a2 (patch)
tree53665655279fd2bb53dcd9b5cf51b46e5241acd4 /lib/urlapi.c
parentcad1f46ce3b4c3483ee14903c7f06aace11deef0 (diff)
downloadcurl-bagder/urlparser-ipv6-zero.tar.gz
urlapi: accept :: as a valid IPv6 addressbagder/urlparser-ipv6-zero
Reported-by: Pavel Volgarev Fixes #5344
Diffstat (limited to 'lib/urlapi.c')
-rw-r--r--lib/urlapi.c2
1 files changed, 1 insertions, 1 deletions
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;