[vlc-commits] ftp: fix crash when accessing default directory

Thomas Guillem git at videolan.org
Mon May 4 09:53:44 CEST 2015


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun May  3 16:36:29 2015 +0000| [54551b5c65a3bc0cf0e07d477d773c6f9b3f27d2] | committer: Thomas Guillem

ftp: fix crash when accessing default directory

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

 modules/access/ftp.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index e9eb77b..fa22a20 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -537,7 +537,8 @@ static int Connect( vlc_object_t *p_access, access_sys_t *p_sys )
             goto error;
     }
 
-    if( (p_sys->features.b_unicode ? IsUTF8 : IsASCII)(p_sys->url.psz_path) == NULL )
+    if( p_sys->url.psz_path &&
+        (p_sys->features.b_unicode ? IsUTF8 : IsASCII)(p_sys->url.psz_path) == NULL )
     {
         msg_Err( p_access, "unsupported path: \"%s\"", p_sys->url.psz_path );
         goto error;



More information about the vlc-commits mailing list