Commit adb4854a authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/asvdec: Use rounded up dimenensions in input size check

Fixes: Timeout
Fixes: 2001/clusterfuzz-testcase-minimized-6187599389523968

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8b3e580b
......@@ -210,7 +210,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVFrame *const p = data;
int mb_x, mb_y, ret;
if (buf_size * 8LL < a->mb_height2 * a->mb_width2 * 13LL)
if (buf_size * 8LL < a->mb_height * a->mb_width * 13LL)
return AVERROR_INVALIDDATA;
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment