mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-03 14:32:16 +02:00
avcodec/asvdec: Check buf_size
Fixes Timeout Fixes: 1746/clusterfuzz-testcase-minimized-6687393392361472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f95f9f9755
commit
cfd1ecdc0b
@ -210,6 +210,9 @@ 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)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
|
||||
return ret;
|
||||
p->pict_type = AV_PICTURE_TYPE_I;
|
||||
|
Loading…
x
Reference in New Issue
Block a user