[vlc-commits] smb: check vlc_UrlParseFixup return

Thomas Guillem git at videolan.org
Thu Dec 7 09:28:01 CET 2017


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

smb: check vlc_UrlParseFixup return

(cherry picked from commit 967b137ecd7f0d798c58d33f5cb6ee739860326b)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

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

 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