[vlc-commits] sftp: fix segfault when user name is not given in mrl
Petri Hintukainen
git at videolan.org
Fri Jan 27 22:18:51 CET 2017
vlc | branch: master | Petri Hintukainen <phintuka at gmail.com> | Fri Jan 27 22:48:02 2017 +0200| [f99b385ef6ef9915822ab3566e2d8ec8b7e44c56] | committer: Petri Hintukainen
sftp: fix segfault when user name is not given in mrl
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f99b385ef6ef9915822ab3566e2d8ec8b7e44c56
---
modules/access/sftp.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/access/sftp.c b/modules/access/sftp.c
index f895ee1..f9bd8aa 100644
--- a/modules/access/sftp.c
+++ b/modules/access/sftp.c
@@ -309,6 +309,9 @@ static int Open( vlc_object_t* p_this )
char* psz_userauthlist = NULL;
do
{
+ if (!credential.psz_username || !credential.psz_username[0])
+ continue;
+
psz_userauthlist = libssh2_userauth_list( p_sys->ssh_session, credential.psz_username, strlen( credential.psz_username ) );
/* TODO: Follow PreferredAuthentications in ssh_config */
More information about the vlc-commits
mailing list