mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-17 15:08:09 +08:00
avcodec/takdec: Check remaining space for first predictors
Fixes: Timeout Fixes: 403673829/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TAK_fuzzer-5498240154009600 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:
@ -434,6 +434,9 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
if (get_bits_left(gb) < 2*10 + 2*size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
s->predictors[0] = get_sbits(gb, 10);
|
||||
s->predictors[1] = get_sbits(gb, 10);
|
||||
s->predictors[2] = get_sbits(gb, size) * (1 << (10 - size));
|
||||
|
Reference in New Issue
Block a user