mirror of
https://github.com/curl/curl.git
synced 2026-08-24 10:43:32 +03:00
urlapi: accept :: as a valid IPv6 address
Text 1560 is extended to verify. Reported-by: Pavel Volgarev Fixes #5344 Closes #5351
This commit is contained in:
parent
11e4ac8291
commit
7f1c098728
2 changed files with 10 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue