[vlc-commits] sftp: check vlc_UrlParseFixup return

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


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec  6 09:36:24 2017 +0100| [571c0232f904a57211c470eb7ab5ebcfde9c0fd9] | committer: Thomas Guillem

sftp: check vlc_UrlParseFixup return

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

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

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index b52ad3605f..f35d9e1b50 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -250,7 +250,12 @@ static int Open( vlc_object_t* p_this )
     p_sys->i_socket = -1;
 
     /* Parse the URL */
-    vlc_UrlParseFixup( &url, p_access->psz_url );
+    if( vlc_UrlParseFixup( &url, p_access->psz_url ) != 0 )
+    {
+        vlc_UrlClean( &url );
+        free( p_sys );
+        return VLC_EGENERIC;
+    }
     vlc_credential_init( &credential, &url );
     if( url.psz_path != NULL )
     {



More information about the vlc-commits mailing list