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

[svn] parse_uname() Would run past the end of the string if the

username was present, but the URL did not contain a slash, e.g.
http://foo:bar@myhost.
Reported by Christian Fraenkel.
This commit is contained in:
hniksic 2001-04-04 07:00:34 -07:00
parent 7747b95480
commit c51015565a
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2001-04-04 Christian Fraenkel <christian.fraenkel@gmx.net>
* url.c (parse_uname): Would run past the end of the string if the
username was present, but the URL did not contain a slash, e.g.
http://foo:bar@myhost.
2001-04-03 KOJIMA Hajime <kjm@rins.ryukoku.ac.jp>
* http.c (http_atotm): Use %A instead of %a to match full

View File

@ -622,7 +622,7 @@ parse_uname (const char *url, char **user, char **passwd)
if (*p != '@')
return URLOK;
/* Else find the username and password. */
for (p = q = col = url; *p != '/'; p++)
for (p = q = col = url; *p && *p != '/'; p++)
{
if (*p == ':' && !*user)
{