aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/fmvc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-17 02:17:13 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-17 02:17:51 +0200
commite11dcc35bb4dbacd87378465b4cafa6a604e8b87 (patch)
treed00298ee5968db52aab444c863f2dc941eaf9c18 /libavcodec/fmvc.c
parent0e87c07d87b474568e82364ae0d4a3928801e2b2 (diff)
downloadffmpeg-e11dcc35bb4dbacd87378465b4cafa6a604e8b87.tar.gz
avcodec/fmvc: Fix off by 1 error
Fixes: out of array access Fixes: 1643/clusterfuzz-testcase-minimized-6117573403869184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/fmvc.c')
-rw-r--r--libavcodec/fmvc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c
index ff5f291da6..2368e95f29 100644
--- a/libavcodec/fmvc.c
+++ b/libavcodec/fmvc.c
@@ -459,7 +459,7 @@ static int decode_frame(AVCodecContext *avctx,
int size, offset, start = 0;
offset = bytestream2_get_le16(gb);
- if (offset > s->nb_blocks)
+ if (offset >= s->nb_blocks)
return AVERROR_INVALIDDATA;
size = bytestream2_get_le16(gb);