History

avcodec/faxcompr: Check available bits in decode_uncompressed()

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

Michael Niedermayer committed 5 years ago

Commit ff56c131 parent 7d8421e1 file · +2 −0Browse files

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

Unified · Split

libavcodec/faxcompr.c+2−0
@@ -144,6 +144,8 @@ static int decode_uncompressed(AVCodecContext *avctx, GetBitContext *gb, · 143 unmodified lines
144 return AVERROR_INVALIDDATA;144 return AVERROR_INVALIDDATA;
145 }145 }
146 cwi = 10 - av_log2(cwi);146 cwi = 10 - av_log2(cwi);
147 if (get_bits_left(gb) < cwi + 1)
148 return AVERROR_INVALIDDATA;
147 skip_bits(gb, cwi + 1);149 skip_bits(gb, cwi + 1);
148 if (cwi > 5) {150 if (cwi > 5) {
149 newmode = get_bits1(gb);151 newmode = get_bits1(gb);

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