[vlc-commits] smb: check vlc_UrlParseFixup return

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


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

smb: check vlc_UrlParseFixup return

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

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

diff --git a/modules/access/smb.c b/modules/access/smb.c
index ce795b398d..f5b77de3ab 100644
--- a/modules/access/smb.c
+++ b/modules/access/smb.c
@@ -175,7 +175,11 @@ static int Open( vlc_object_t *p_this )
 # undef open
 #endif
 
-    vlc_UrlParseFixup( &url, p_access->psz_url );
+    if( vlc_UrlParseFixup( &url, p_access->psz_url ) != 0 )
+    {
+        vlc_UrlClean( &url );
+        return VLC_EGENERIC;
+    }
     if( url.psz_path )
     {
         psz_decoded_path = vlc_uri_decode_duplicate( url.psz_path );



More information about the vlc-commits mailing list