diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-20 01:44:07 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-20 01:44:07 +0100 |
commit | f9c2d4d17e3b18becb046d71811f9e8aa5946cf9 (patch) | |
tree | 98d8dc909379a94c39cfff800f61c6418c6b8e4d | |
parent | f29cdbe1b59a0d997733b507041e15ec68cef00c (diff) | |
download | ffmpeg-f9c2d4d17e3b18becb046d71811f9e8aa5946cf9.tar.gz |
Allow decoding of slightly broken Nikon avi files.
Fixes ticket #3330.
-rw-r--r-- | libavformat/avidec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 1f9fa149e1..57fbcd7a1b 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -350,6 +350,8 @@ 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 }; + if (avio_tell(s->pb) + size > tag_end) + size = tag_end - avio_tell(s->pb); size -= avio_read(s->pb, buffer, FFMIN(size, sizeof(buffer) - 1)); switch (tag) { |