[vlc-devel] [PATCH] sftp: ssh authentication list can return NULL if fails

Ion Agorria ion at agorria.com
Thu Oct 26 10:34:38 CEST 2017


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

diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index c119a223f8..41ae894da3 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -313,6 +313,10 @@ static int Open( vlc_object_t* p_this )
             continue;
 
         psz_userauthlist = libssh2_userauth_list( p_sys->ssh_session, credential.psz_username, strlen( credential.psz_username ) );
+        if (!psz_userauthlist) {
+            msg_Err( p_access, "Host authentication list failed");
+            goto error;
+        }
 
         /* TODO: Follow PreferredAuthentications in ssh_config */
 
-- 
2.13.6



More information about the vlc-devel mailing list