[vlc-devel] [PATCH] [RFC] support FTP UTF-8 names

Rémi Denis-Courmont remi at remlab.net
Thu Aug 11 16:04:40 CEST 2016


Le 2016-08-11 15:58, Jean-Baptiste Kempf a écrit :
> --
> I have NO idea if that is the correct way or not, tbh :)

If file is just a filename (in particular, it contains no slashes 
ever), then leak-aside, that seems correct.

Though I think IPv6 literals are not handled correctly there.

> (Yes, it leaks, it's not the question here)
> ---
>  modules/access/ftp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/access/ftp.c b/modules/access/ftp.c
> index 1d14f52..9ec110b 100644
> --- a/modules/access/ftp.c
> +++ b/modules/access/ftp.c
> @@ -926,7 +926,7 @@ static int DirRead (access_t *p_access,
> input_item_node_t *p_current_node)
>                        p_sys->url.psz_host, p_sys->url.i_port,
>                        p_sys->url.psz_path ? "/" : "",
>                        p_sys->url.psz_path ? p_sys->url.psz_path : 
> "",
> -                      psz_file ) != -1 )
> +                      vlc_uri_encode( psz_file ) ) != -1 )
>          {
>              i_ret = access_fsdir_additem( &fsdir, psz_uri, psz_file,
>                                            type, ITEM_NET );

-- 
Rémi Denis-Courmont
Looking for a job
http://www.remlab.net/


More information about the vlc-devel mailing list