diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-05-18 23:27:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-15 18:54:34 +0200 |
commit | 90b27febc6ac6f55cb2b9df3a45fd032dfb80f1a (patch) | |
tree | 091410be59604fccce421b512bce1da069579d87 | |
parent | c1c6cb21b7d2e9bc82142ff0906fabef835b12ad (diff) | |
download | ffmpeg-90b27febc6ac6f55cb2b9df3a45fd032dfb80f1a.tar.gz |
avformat/avidec: Detect index with too short entries
Fixes Ticket5498
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d08f2c172fd2baab022f0118f49e5b2852a2d463)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/avidec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 5a88e05282..5366847793 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1694,6 +1694,8 @@ static int guess_ni_flag(AVFormatContext *s) size = avio_rl32(s->pb); if (get_stream_idx(tag) == i && pos + size > st->index_entries[1].pos) last_start = INT64_MAX; + if (get_stream_idx(tag) == i && size == st->index_entries[0].size + 8) + last_start = INT64_MAX; } if (st->index_entries[0].pos > last_start) |