[vlc-commits] stream_filter: dash: fix out of bounds exception
Francois Cartegnie
git at videolan.org
Mon Nov 17 18:29:43 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sun Nov 16 16:28:04 2014 +0100| [d316ab1a5d8e2faa9d4bfd1af1e17b812251d18f] | committer: Francois Cartegnie
stream_filter: dash: fix out of bounds exception
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d316ab1a5d8e2faa9d4bfd1af1e17b812251d18f
---
modules/stream_filter/dash/Helper.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/stream_filter/dash/Helper.cpp b/modules/stream_filter/dash/Helper.cpp
index 57815ce..b26dbce 100644
--- a/modules/stream_filter/dash/Helper.cpp
+++ b/modules/stream_filter/dash/Helper.cpp
@@ -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);
More information about the vlc-commits
mailing list