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

Michael Niedermayer git at videolan.org
Thu May 19 00:03:54 CEST 2016


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

avformat/avidec: Detect index with too short entries

Fixes Ticket5498

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

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

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

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index b114a74..01d4a97 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -1699,6 +1699,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