[vlc-commits] demux:mkv: prevent a crash with multiple edition files

Steve Lhomme git at videolan.org
Mon Feb 26 10:12:01 CET 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Feb 22 17:53:00 2018 +0100| [3e5acc8d2110e6d1df8ae4741feb386473769c41] | committer: Hugo Beauzée-Luyssen

demux:mkv: prevent a crash with multiple edition files

(cherry-picked from commit df043b5d4531ad1d60580a44b58a338d0b99e6c4)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 modules/demux/mkv/demux.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/demux/mkv/demux.cpp b/modules/demux/mkv/demux.cpp
index 6e8323657c..d42115b7f5 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -613,6 +613,9 @@ bool demux_sys_t::PreloadLinked()
     if ( !p_current_vsegment )
         return false;
 
+    if ( unlikely(p_current_vsegment->CurrentEdition() == NULL) )
+        return false;
+
     /* Set current chapter */
     p_current_vsegment->p_current_vchapter = p_current_vsegment->CurrentEdition()->getChapterbyTimecode(0);
     msg_Dbg( &demuxer, "NEW START CHAPTER uid=%" PRId64, p_current_vsegment->p_current_vchapter && p_current_vsegment->p_current_vchapter->p_chapter ?



More information about the vlc-commits mailing list