mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Reject port numbers greater than 65535.
This commit is contained in:
parent
dbd0607ea8
commit
f3aece8d22
@ -1,3 +1,8 @@
|
|||||||
|
2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* url.c (url_parse): Reject port numbers larger than 65535. We
|
||||||
|
also check for overflow while parsing port numbers.
|
||||||
|
|
||||||
2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
|
2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* utils.c (read_file): Don't use wgint for file size; LFS won't
|
* utils.c (read_file): Don't use wgint for file size; LFS won't
|
||||||
|
@ -781,6 +781,13 @@ url_parse (const char *url, int *error)
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
port = 10 * port + (*pp - '0');
|
port = 10 * port + (*pp - '0');
|
||||||
|
/* Check for too large port numbers here, before we have
|
||||||
|
a chance to overflow on bogus port values. */
|
||||||
|
if (port > 65535)
|
||||||
|
{
|
||||||
|
error_code = PE_BAD_PORT_NUMBER;
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user