aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-02-02 22:29:25 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-02-14 19:55:02 +0100
commitb24d3bfe66b5cc4eb5dbd0e2f2fdb51aa4f901a2 (patch)
treeef29bae2527c6a0d38d6ae6dceb64eecbed5d8da
parentc000a9128815e7cee4316dc45605259bbaa138ff (diff)
downloadffmpeg-b24d3bfe66b5cc4eb5dbd0e2f2fdb51aa4f901a2.tar.gz
avcodec/fmvc: avoid copying uninitialized data
Fixes: Timeout Fixes: 30049/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FMVC_fuzzer-5986909455253504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/fmvc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c
index 5bee96a18d..3701b0849b 100644
--- a/libavcodec/fmvc.c
+++ b/libavcodec/fmvc.c
@@ -440,6 +440,8 @@ static int decode_frame(AVCodecContext *avctx, void *data,
memcpy(dst, src, avctx->width * s->bpp);
dst -= frame->linesize[0];
src += s->stride * 4;
+ if (bytestream2_tell_p(pb) < y*s->stride * 4)
+ break;
}
} else {
unsigned block, nb_blocks;