Fixes: Timeout Fixes: 34950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5686764151898112 Fixes: 34966/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4587409334468608
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -144,6 +144,8 @@ static int decode_uncompressed(AVCodecContext *avctx, GetBitContext *gb, · 143 unmodified lines | ||
| 144 | 144 | return AVERROR_INVALIDDATA; |
| 145 | 145 | } |
| 146 | 146 | cwi = 10 - av_log2(cwi); |
| 147 | + if (get_bits_left(gb) < cwi + 1) | |
| 148 | + return AVERROR_INVALIDDATA; | |
| 147 | 149 | skip_bits(gb, cwi + 1); |
| 148 | 150 | if (cwi > 5) { |
| 149 | 151 | newmode = get_bits1(gb); |