[vlc-commits] stream_filter: dash: fix null dereference on empty segments list

Francois Cartegnie git at videolan.org
Thu Nov 13 12:39:43 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Nov 13 10:07:50 2014 +0100| [5d7dc0832f7b30e5d2958cd50750aa0b2a85d58d] | committer: Francois Cartegnie

stream_filter: dash: fix null dereference on empty segments list

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

 modules/stream_filter/dash/mpd/IsoffMainManager.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/stream_filter/dash/mpd/IsoffMainManager.cpp b/modules/stream_filter/dash/mpd/IsoffMainManager.cpp
index 3607b1f..64b33fd 100644
--- a/modules/stream_filter/dash/mpd/IsoffMainManager.cpp
+++ b/modules/stream_filter/dash/mpd/IsoffMainManager.cpp
@@ -52,7 +52,8 @@ std::vector<Segment*>       IsoffMainManager::getSegments           (const Repre
             retSegments.push_back(initSegment);
     }
 
-    retSegments.insert(retSegments.end(), list->getSegments().begin(), list->getSegments().end());
+    if ( list )
+        retSegments.insert(retSegments.end(), list->getSegments().begin(), list->getSegments().end());
     return retSegments;
 }
 const std::vector<Period*>& IsoffMainManager::getPeriods            () const



More information about the vlc-commits mailing list