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:
parent
774c7c7461
commit
1bea726393
@ -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>
|
2002-01-26 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* url.c (urlchr_table): Make square braces reserved, so we can
|
* url.c (urlchr_table): Make square braces reserved, so we can
|
||||||
|
31
src/url.c
31
src/url.c
@ -704,20 +704,23 @@ url_parse (const char *url, int *error)
|
|||||||
int invalid = 0;
|
int invalid = 0;
|
||||||
++p;
|
++p;
|
||||||
while (1)
|
while (1)
|
||||||
switch (*p++)
|
{
|
||||||
{
|
char c = *p++;
|
||||||
case ']':
|
switch (c)
|
||||||
goto out;
|
{
|
||||||
case '\0':
|
case ']':
|
||||||
SETERR (error, PE_UNTERMINATED_IPV6_ADDRESS);
|
goto out;
|
||||||
return NULL;
|
case '\0':
|
||||||
case '0': case '1': case '2': case '3': case '4':
|
SETERR (error, PE_UNTERMINATED_IPV6_ADDRESS);
|
||||||
case '5': case '6': case '7': case '8': case '9':
|
return NULL;
|
||||||
case ':': case '.':
|
case ':': case '.':
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
invalid = 1;
|
if (ISXDIGIT (c))
|
||||||
}
|
break;
|
||||||
|
invalid = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
out:
|
out:
|
||||||
if (invalid)
|
if (invalid)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user