aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-20 04:23:57 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-20 04:24:02 +0100
commit4014b401b0d55f27b7c430962b63f6b3fbf834c5 (patch)
treeaa3997c301c7b7fd542f2f35015cfd152538d33a
parenta493f8541de20e76073433f39f66da31f3834bc4 (diff)
parentf9c2d4d17e3b18becb046d71811f9e8aa5946cf9 (diff)
downloadffmpeg-4014b401b0d55f27b7c430962b63f6b3fbf834c5.tar.gz
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master: Allow decoding of slightly broken Nikon avi files. Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/avidec.c2
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) {