From a6eb0714fa25f083959491abf631549deb51047a Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 13 Oct 2014 16:42:00 +0200 Subject: [PATCH] demux_mkv: fix undefined behavior With some files, the extradata variable can remain uninitialized, but will be used for memory access. CC: @mpv-player/stable (with high priority) --- demux/demux_mkv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 8c00a8fe8f..01939274da 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -1149,7 +1149,7 @@ static const videocodec_info_t vinfo[] = { static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track) { - unsigned char *extradata; + unsigned char *extradata = NULL; unsigned int extradata_size = 0; bool raw = false; struct sh_stream *sh = new_sh_stream(demuxer, STREAM_VIDEO);