[vlc-commits] ftp: check vlc_UrlParseFixup return

Thomas Guillem git at videolan.org
Thu Dec 7 09:28:03 CET 2017


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

ftp: check vlc_UrlParseFixup return

(cherry picked from commit 2d45569c50404d45bd44482a00d982b87467c600)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 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