aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-05-18 23:27:54 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2016-08-15 18:54:34 +0200
commit90b27febc6ac6f55cb2b9df3a45fd032dfb80f1a (patch)
tree091410be59604fccce421b512bce1da069579d87
parentc1c6cb21b7d2e9bc82142ff0906fabef835b12ad (diff)
downloadffmpeg-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.c2
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)