aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/m101.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-17 21:13:17 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-06-29 19:22:19 +0200
commit89b96900fa7c17d0770c9af26af7c3ae36ae0253 (patch)
tree3c8777645b6d0e419e0165d3e44b6c10153fca77 /libavcodec/m101.c
parent8d8b8c4ac6fb5b5d40bd131f2d2ea9d85b8759a6 (diff)
downloadffmpeg-89b96900fa7c17d0770c9af26af7c3ae36ae0253.tar.gz
avcodec/m101: Fix off be 2 error
Fixes: out of array read Fixes: 15263/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_M101_fuzzer-5728999453491200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/m101.c')
-rw-r--r--libavcodec/m101.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/m101.c b/libavcodec/m101.c
index d2549668fd..70f1da4f45 100644
--- a/libavcodec/m101.c
+++ b/libavcodec/m101.c
@@ -61,7 +61,7 @@ static int m101_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
stride = AV_RL32(avctx->extradata + 5*4);
if (avctx->pix_fmt == AV_PIX_FMT_YUV422P10)
- min_stride = (avctx->width + 15) / 16 * 20;
+ min_stride = (avctx->width + 15) / 16 * 40;
if (stride < min_stride || avpkt->size < stride * (uint64_t)avctx->height) {
av_log(avctx, AV_LOG_ERROR, "stride (%d) is invalid for packet sized %d\n",