mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-10-19 09:53:18 +00: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>
(cherry picked from commit 8e6db875af
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
bcf1a19e06
commit
be2fff27a0
1 changed files with 3 additions and 0 deletions
|
@ -432,6 +432,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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue