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:
parent
ceba1d446a
commit
057384baa6
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user