[vlc-commits] vlc_UrlParse: end username at the last @ rather than the first

Rémi Denis-Courmont git at videolan.org
Sun Jun 16 14:12:23 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 16 15:11:03 2013 +0300| [886de66d58d930e46ef5cb2dc875d2aea5b83f71] | committer: 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).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=886de66d58d930e46ef5cb2dc875d2aea5b83f71
---

 src/text/url.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/text/url.c b/src/text/url.c
index 06fb817..40043ba 100644
--- a/src/text/url.c
+++ b/src/text/url.c
@@ -433,7 +433,7 @@ void vlc_UrlParse (vlc_url_t *restrict url, const char *str, unsigned char opt)
         url->psz_path = "/";*/
 
     /* User name */
-    next = strchr (cur, '@');
+    next = strrchr (cur, '@');
     if (next != NULL)
     {
         *(next++) = '\0';



More information about the vlc-commits mailing list