Fixes: Timeout Fixes: 64163/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LEAD_fuzzer-6418925835124736
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -104,6 +104,9 @@ static int decode_block(LeadContext * s, GetBitContext * gb, · 103 unmodified lines | ||
| 104 | 104 | |
| 105 | 105 | s->bdsp.clear_block(block); |
| 106 | 106 | |
| 107 | + if (get_bits_left(gb) <= 0) | |
| 108 | + return AVERROR_INVALIDDATA; | |
| 109 | + | |
| 107 | 110 | size = get_vlc2(gb, dc_table, dc_bits, 1); |
| 108 | 111 | if (size < 0) |
| 109 | 112 | return AVERROR_INVALIDDATA; |