You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/faxcompr: Check if bits are available before reading in cmode == 9 || cmode == 10
Fixes: Timeout Fixes: 34950/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-5686764151898112 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:
@@ -304,7 +304,10 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
|
|||||||
mode = !mode;
|
mode = !mode;
|
||||||
}
|
}
|
||||||
} else if (cmode == 9 || cmode == 10) {
|
} else if (cmode == 9 || cmode == 10) {
|
||||||
int xxx = get_bits(gb, 3);
|
int xxx;
|
||||||
|
if (get_bits_left(gb) < 3)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
xxx = get_bits(gb, 3);
|
||||||
if (cmode == 9 && xxx == 7) {
|
if (cmode == 9 && xxx == 7) {
|
||||||
int ret;
|
int ret;
|
||||||
int pix_left = width - offs;
|
int pix_left = width - offs;
|
||||||
|
Reference in New Issue
Block a user