Skip to content

Commit

Permalink
* include/vlc_url.h: vlc_UrlParse(): forbid use of '/' in login or pa…
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinecellerier committed May 21, 2007
1 parent df3aadf commit 889362b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/vlc_url.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ static inline void vlc_UrlParse( vlc_url_t *url, const char *psz_url,
char *psz_dup;
char *psz_parse;
char *p;
char *p2;

url->psz_protocol = NULL;
url->psz_username = NULL;
Expand Down Expand Up @@ -108,7 +109,8 @@ static inline void vlc_UrlParse( vlc_url_t *url, const char *psz_url,
psz_parse = p;
}
p = strchr( psz_parse, '@' );
if( p != NULL )
p2 = strchr( psz_parse, '/' );
if( p != NULL && ( p2 != NULL ? p < p2 : 1 ) )
{
/* We have a login */
url->psz_username = psz_parse;
Expand Down

0 comments on commit 889362b

Please sign in to comment.