[FFmpeg-cvslog] avcodec/fmvc: Fix off by 1 error
Michael Niedermayer
git at videolan.org
Fri Jun 2 03:04:00 EEST 2017
ffmpeg | branch: release/3.3 | Michael Niedermayer <michael at niedermayer.cc> | Wed May 17 02:17:13 2017 +0200| [fedd8b65077d8f78de22c56fb5c408271af7c7a5] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit e11dcc35bb4dbacd87378465b4cafa6a604e8b87)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fedd8b65077d8f78de22c56fb5c408271af7c7a5
---
libavcodec/fmvc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
More information about the ffmpeg-cvslog
mailing list