diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-20 22:37:18 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-01-20 22:40:36 +0100 |
commit | 4fdcb1e1b7b1369b74faeeae2358feed7989de1b (patch) | |
tree | 5ef70c3fe91b31d66eb966a267b9e9bd053edc92 | |
parent | b902ba478c81909422668fa7da7878848d792e52 (diff) | |
download | ffmpeg-4fdcb1e1b7b1369b74faeeae2358feed7989de1b.tar.gz |
Allow decoding of slightly broken Nikon avi files.
Fixes ticket #3330.
(cherry picked from commit f9c2d4d17e3b18becb046d71811f9e8aa5946cf9)
Conflicts:
libavformat/avidec.c
-rw-r--r-- | libavformat/avidec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 2d60bfb9ca..d2f0152735 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -327,6 +327,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) { |