diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2016-05-18 23:27:54 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-06-05 02:40:31 +0200 |
commit | b11900251fff69214cb5c73b491ca14c6bc2eacb (patch) | |
tree | 3c900c6258b0987784c7c0720f5598d7146995ba | |
parent | 145b18ce9a27554fdb4af5f2c122b5f44bf521b3 (diff) | |
download | ffmpeg-b11900251fff69214cb5c73b491ca14c6bc2eacb.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 38598107fc..a6459a0e05 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1695,6 +1695,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) |