1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Allow all hex digits in IPv6 IP addresses.

Published in <sxsofjgvo72.fsf@florida.arsdigita.de>.
This commit is contained in:
hniksic 2002-01-26 12:43:17 -08:00
parent 774c7c7461
commit 1bea726393
2 changed files with 22 additions and 14 deletions

View File

@ -1,3 +1,8 @@
2002-01-26 Hrvoje Niksic <hniksic@arsdigita.com>
* url.c (url_parse): Allow all hex digits, not only decimal ones,
to form an IP address.
2002-01-26 Hrvoje Niksic <hniksic@arsdigita.com>
* url.c (urlchr_table): Make square braces reserved, so we can

View File

@ -704,20 +704,23 @@ url_parse (const char *url, int *error)
int invalid = 0;
++p;
while (1)
switch (*p++)
{
case ']':
goto out;
case '\0':
SETERR (error, PE_UNTERMINATED_IPV6_ADDRESS);
return NULL;
case '0': case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
case ':': case '.':
break;
default:
invalid = 1;
}
{
char c = *p++;
switch (c)
{
case ']':
goto out;
case '\0':
SETERR (error, PE_UNTERMINATED_IPV6_ADDRESS);
return NULL;
case ':': case '.':
break;
default:
if (ISXDIGIT (c))
break;
invalid = 1;
}
}
out:
if (invalid)
{