[vlc-commits] sftp: check vlc_UrlParseFixup return
Thomas Guillem
git at videolan.org
Thu Dec 7 09:27:59 CET 2017
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Dec 6 09:36:24 2017 +0100| [ae324f4ceb692f92200038e6570d371081e856cc] | committer: Thomas Guillem
sftp: check vlc_UrlParseFixup return
(cherry picked from commit 571c0232f904a57211c470eb7ab5ebcfde9c0fd9)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=ae324f4ceb692f92200038e6570d371081e856cc
---
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