History

avcodec/leaddec: Check remaining bits in decode_block()

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

Michael Niedermayer committed 2 years ago

Commit d909d8e1 parent 5f884581 file · +3 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/leaddec.c+3−0
@@ -104,6 +104,9 @@ static int decode_block(LeadContext * s, GetBitContext * gb, · 103 unmodified lines
104104
105105 s->bdsp.clear_block(block);
106106
107+ if (get_bits_left(gb) <= 0)
108+ return AVERROR_INVALIDDATA;
109+
107110 size = get_vlc2(gb, dc_table, dc_bits, 1);
108111 if (size < 0)
109112 return AVERROR_INVALIDDATA;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t