[FFmpeg-cvslog] Allow decoding of slightly broken Nikon avi files.

Carl Eugen Hoyos git at videolan.org
Mon Jan 20 22:41:55 CET 2014


ffmpeg | branch: release/2.1 | Carl Eugen Hoyos <cehoyos at ag.or.at> | Mon Jan 20 22:37:18 2014 +0100| [ee3822af631c27521fd15f94a00bdbc98eabd082] | committer: Carl Eugen Hoyos

Allow decoding of slightly broken Nikon avi files.

Fixes ticket #3330.
(cherry picked from commit f9c2d4d17e3b18becb046d71811f9e8aa5946cf9)

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

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

diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 10116bd..57beb68 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -348,6 +348,7 @@ static void avi_read_nikon(AVFormatContext *s, uint64_t end)
                 uint16_t size    = avio_rl16(s->pb);
                 const char *name = NULL;
                 char buffer[64]  = { 0 };
+                size = FFMIN(size, tag_end - avio_tell(s->pb));
                 size -= avio_read(s->pb, buffer,
                                   FFMIN(size, sizeof(buffer) - 1));
                 switch (tag) {



More information about the ffmpeg-cvslog mailing list