Commit 886de66d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vlc_UrlParse: end username at the last @ rather than the first

This fixes the corner where the username or the password contains @
(although encoding would probably be a better idea).
parent 3bd1fcda
...@@ -433,7 +433,7 @@ void vlc_UrlParse (vlc_url_t *restrict url, const char *str, unsigned char opt) ...@@ -433,7 +433,7 @@ void vlc_UrlParse (vlc_url_t *restrict url, const char *str, unsigned char opt)
url->psz_path = "/";*/ url->psz_path = "/";*/
/* User name */ /* User name */
next = strchr (cur, '@'); next = strrchr (cur, '@');
if (next != NULL) if (next != NULL)
{ {
*(next++) = '\0'; *(next++) = '\0';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment