1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

avcodec/leaddec: Check remaining bits in decode_block()

Fixes: Timeout
Fixes: 64163/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LEAD_fuzzer-6418925835124736

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:
Michael Niedermayer 2023-12-15 02:18:04 +01:00
parent 5f88458bea
commit d909d8e5e0
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -104,6 +104,9 @@ static int decode_block(LeadContext * s, GetBitContext * gb,
s->bdsp.clear_block(block);
if (get_bits_left(gb) <= 0)
return AVERROR_INVALIDDATA;
size = get_vlc2(gb, dc_table, dc_bits, 1);
if (size < 0)
return AVERROR_INVALIDDATA;