Commit 90b27feb authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/avidec: Detect index with too short entries

Fixes Ticket5498
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d08f2c17)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent c1c6cb21
...@@ -1694,6 +1694,8 @@ static int guess_ni_flag(AVFormatContext *s) ...@@ -1694,6 +1694,8 @@ static int guess_ni_flag(AVFormatContext *s)
size = avio_rl32(s->pb); size = avio_rl32(s->pb);
if (get_stream_idx(tag) == i && pos + size > st->index_entries[1].pos) if (get_stream_idx(tag) == i && pos + size > st->index_entries[1].pos)
last_start = INT64_MAX; 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) if (st->index_entries[0].pos > last_start)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment