Message ID | 20210731192649.16731-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | f803635c4fac761ac68b39a369272d4c26433dc1 |
Headers | show |
Series | [FFmpeg-devel] avcodec/faxcompr: Check for end of input in cmode == 1 in decode_group3_2d_line() | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On Sat, Jul 31, 2021 at 09:26:49PM +0200, Michael Niedermayer wrote: > Fixes: Infinite loop > Fixes: 35591/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4503764022198272 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/faxcompr.c | 2 ++ > 1 file changed, 2 insertions(+) will apply [...]
diff --git a/libavcodec/faxcompr.c b/libavcodec/faxcompr.c index 44c1f6f6b9..b283831dae 100644 --- a/libavcodec/faxcompr.c +++ b/libavcodec/faxcompr.c @@ -283,6 +283,8 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb, for (k = 0; k < 2; k++) { run = 0; for (;;) { + if (get_bits_left(gb) <= 0) + return AVERROR_INVALIDDATA; t = get_vlc2(gb, ccitt_vlc[mode].table, 9, 2); if (t == -1) { av_log(avctx, AV_LOG_ERROR, "Incorrect code\n");
Fixes: Infinite loop Fixes: 35591/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuzzer-4503764022198272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/faxcompr.c | 2 ++ 1 file changed, 2 insertions(+)