[FFmpeg-cvslog] avformat/avidec: Detect index with too short entries

Michael Niedermayer git at videolan.org
Sun Jun 5 03:16:43 CEST 2016


ffmpeg | branch: release/3.0 | Michael Niedermayer <michael at niedermayer.cc> | Wed May 18 23:27:54 2016 +0200| [b11900251fff69214cb5c73b491ca14c6bc2eacb] | committer: Michael Niedermayer

avformat/avidec: Detect index with too short entries

Fixes Ticket5498

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit d08f2c172fd2baab022f0118f49e5b2852a2d463)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b11900251fff69214cb5c73b491ca14c6bc2eacb
---

 libavformat/avidec.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 3859810..a6459a0 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)



More information about the ffmpeg-cvslog mailing list