[vlc-devel] [PATCH] LUA: Remove protocol from vlc.path after redirect
Rafaël Carré
funman at videolan.org
Fri Jan 6 00:41:19 CET 2012
Le 12-01-05 18:38, Gaurav Narula a écrit :
> ---
> modules/access/http.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/modules/access/http.c b/modules/access/http.c
> index d32a0a9..deaab84 100644
> --- a/modules/access/http.c
> +++ b/modules/access/http.c
> @@ -581,7 +581,8 @@ connect:
> goto error;
> }
> free( p_access->psz_location );
> - p_access->psz_location = strdup( p_sys->psz_location );
> + char *slash = strstr(p_sys->psz_location, "://");
> + p_access->psz_location = (slash) ? strdup( slash + 3 ) : p_sys->psz_location;
This will probably crash when freeing p_access->psz_location if slash is
NULL
Also you don't need parens around slash
> /* Clean up current Open() run */
> vlc_UrlClean( &p_sys->url );
> http_auth_Reset( &p_sys->auth );
More information about the vlc-devel
mailing list