[vlc-commits] MKV: fix SIGSEGV when codec id is empty

Jean-Baptiste Kempf git at videolan.org
Sun Oct 6 17:54:31 CEST 2013


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Oct  6 17:53:44 2013 +0200| [e898c6ae9bed95086fee5c0502a645b8c5848b80] | committer: Jean-Baptiste Kempf

MKV: fix SIGSEGV when codec id is empty

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

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

diff --git a/modules/demux/mkv/matroska_segment_parse.cpp b/modules/demux/mkv/matroska_segment_parse.cpp
index bc1ba67..3b058de 100644
--- a/modules/demux/mkv/matroska_segment_parse.cpp
+++ b/modules/demux/mkv/matroska_segment_parse.cpp
@@ -1263,6 +1263,14 @@ void matroska_segment_c::ParseCluster( bool b_update_start_time )
 int32_t matroska_segment_c::TrackInit( mkv_track_t * p_tk )
 {
     es_format_t *p_fmt = &p_tk->fmt;
+
+    if( p_tk->psz_codec == NULL )
+    {
+        msg_Err( &sys.demuxer, "Empty codec id" );
+        p_tk->fmt.i_codec = VLC_FOURCC( 'u', 'n', 'd', 'f' );
+        return 0;
+    }
+
     if( !strcmp( p_tk->psz_codec, "V_MS/VFW/FOURCC" ) )
     {
         if( p_tk->i_extra_data < (int)sizeof( VLC_BITMAPINFOHEADER ) )



More information about the vlc-commits mailing list