aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-07 12:24:27 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-08 08:47:29 +0200
commit7f1c098728529b206e9118dcbccfd2611f8a70e4 (patch)
tree5011b76b02a415b136bc605c2b4af0dc333b6875 /lib
parent11e4ac8291d16f5d5c5252a0ad4cf9d29bce2718 (diff)
urlapi: accept :: as a valid IPv6 address
Text 1560 is extended to verify. Reported-by: Pavel Volgarev Fixes #5344 Closes #5351
Diffstat (limited to 'lib')
-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;