1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mov: fix self referencing timecode tracks

Fixes read after free.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-02-20 15:45:50 +01:00
parent 951d39fecd
commit 2ccaab9709

View File

@ -3173,7 +3173,7 @@ static int mov_read_header(AVFormatContext *s)
if (s->streams[j]->id == sc->timecode_track)
tmcd_st_id = j;
if (tmcd_st_id < 0)
if (tmcd_st_id < 0 || tmcd_st_id == i)
continue;
tcr = av_dict_get(s->streams[tmcd_st_id]->metadata, "timecode", NULL, 0);
if (tcr)