[vlc-commits] MKV: fix SIGSEGV when codec id is empty
Jean-Baptiste Kempf
git at videolan.org
Tue Oct 8 23:55:24 CEST 2013
vlc/vlc-2.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Oct 6 17:53:44 2013 +0200| [d41a900afb55f8f1062a98bd307db52b7558fd45] | committer: Jean-Baptiste Kempf
MKV: fix SIGSEGV when codec id is empty
(cherry picked from commit e898c6ae9bed95086fee5c0502a645b8c5848b80)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=d41a900afb55f8f1062a98bd307db52b7558fd45
---
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