Commit 951bb763 authored by Michael Niedermayer's avatar Michael Niedermayer

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/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5cf42f65
......@@ -208,6 +208,9 @@ static int aic_decode_coeffs(GetBitContext *gb, int16_t *dst,
int mb, idx;
unsigned val;
if (get_bits_left(gb) < 5)
return AVERROR_INVALIDDATA;
has_skips = get_bits1(gb);
coeff_type = get_bits1(gb);
coeff_bits = get_bits(gb, 3);
......
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