[vlc-commits] demux:mkv: prevent a crash with multiple edition files
Steve Lhomme
git at videolan.org
Fri Feb 23 10:51:19 CET 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Feb 22 17:53:00 2018 +0100| [df043b5d4531ad1d60580a44b58a338d0b99e6c4] | committer: Steve Lhomme
demux:mkv: prevent a crash with multiple edition files
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=df043b5d4531ad1d60580a44b58a338d0b99e6c4
---
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 36c4d35889..5665af76ff 100644
--- a/modules/demux/mkv/demux.cpp
+++ b/modules/demux/mkv/demux.cpp
@@ -616,6 +616,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