]> git.sesse.net Git - vlc/commitdiff
stream_filter: dash: fix out of bounds exception
authorFrancois Cartegnie <fcvlcdev@free.fr>
Sun, 16 Nov 2014 15:28:04 +0000 (16:28 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 17 Nov 2014 17:29:29 +0000 (18:29 +0100)
modules/stream_filter/dash/Helper.cpp

index 57815cefb0d25547d2dfc6fa99a3056b125f8096..b26dbce99a7c0be75f4c286a91949f8b62bfd0bf 100644 (file)
@@ -31,6 +31,11 @@ using namespace dash;
 
 std::string Helper::combinePaths        (const std::string &path1, const std::string &path2)
 {
+    if ( path2.length() == 0 )
+        return path1;
+    else if ( path1.length() == 0 )
+        return path2;
+
     char path1Last  = path1.at(path1.size() - 1);
     char path2First = path2.at(0);