1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 16:33:02 +00:00

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)
This commit is contained in:
wm4 2014-10-13 16:42:00 +02:00
parent ceba1d446a
commit 057384baa6

View File

@ -1149,7 +1149,7 @@ static const videocodec_info_t vinfo[] = {
static int demux_mkv_open_video(demuxer_t *demuxer, mkv_track_t *track) 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; unsigned int extradata_size = 0;
bool raw = false; bool raw = false;
struct sh_stream *sh = new_sh_stream(demuxer, STREAM_VIDEO); struct sh_stream *sh = new_sh_stream(demuxer, STREAM_VIDEO);