]> sjero.net Git - wget/blobdiff - src/url.c
[svn] parse_uname() Would run past the end of the string if the
[wget] / src / url.c
index f91263e66085096915cd26d0b8d9d35be7d151d2..7e31e51ef10c85800691bd230b3d8ff8988042c5 100644 (file)
--- a/src/url.c
+++ b/src/url.c
@@ -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)
        {