[vlc-commits] ftp: check vlc_UrlParseFixup return

Thomas Guillem git at videolan.org
Wed Dec 6 10:13:36 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec  6 09:47:23 2017 +0100| [2d45569c50404d45bd44482a00d982b87467c600] | committer: Thomas Guillem

ftp: check vlc_UrlParseFixup return

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

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

diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index fd486831cb..2839a45d22 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -443,7 +443,11 @@ static int Login( vlc_object_t *p_access, access_sys_t *p_sys )
 
     vlc_url_t url;
     vlc_credential credential;
-    vlc_UrlParseFixup( &url, ((stream_t *)p_access)->psz_url );
+    if( vlc_UrlParseFixup( &url, ((stream_t *)p_access)->psz_url ) != 0 )
+    {
+        vlc_UrlClean( &url );
+        goto error;
+    }
     vlc_credential_init( &credential, &url );
     bool b_logged = false;
 



More information about the vlc-commits mailing list