aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-20 15:45:50 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-20 15:46:33 +0100
commit2ccaab9709aadc51625a28597d6a9012607958b4 (patch)
treeaed13673889369a3e93a4dd3b3c9ed59d683bd69
parent951d39fecd1f6c6e7de63c5835e6776b0de27511 (diff)
downloadffmpeg-2ccaab9709aadc51625a28597d6a9012607958b4.tar.gz
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>
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 5575b827c2..86ec95c1e5 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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)