mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
avcodec/aic: Check remaining bits in aic_decode_coeffs()
Fixes: Timeout (78 seconds -> 2 seconds) Fixes: 13186/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AIC_fuzzer-5639516533030912 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 951bb7632fe6e3bb1a9c3b47610705871e471f34) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
29619a8ac2
commit
6c0124d392
@ -208,6 +208,9 @@ static int aic_decode_coeffs(GetBitContext *gb, int16_t *dst,
|
|||||||
int mb, idx;
|
int mb, idx;
|
||||||
unsigned val;
|
unsigned val;
|
||||||
|
|
||||||
|
if (get_bits_left(gb) < 5)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
|
||||||
has_skips = get_bits1(gb);
|
has_skips = get_bits1(gb);
|
||||||
coeff_type = get_bits1(gb);
|
coeff_type = get_bits1(gb);
|
||||||
coeff_bits = get_bits(gb, 3);
|
coeff_bits = get_bits(gb, 3);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user