提交 db1c4acd 编写于 作者: M Michael Niedermayer

avcodec/fic: Check that there is input left in fic_decode_block()

Fixes: Timeout
Fixes: 12450/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-5661984622641152

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: NMichael Niedermayer <michael@niedermayer.cc>
上级 b559c58a
...@@ -139,6 +139,9 @@ static int fic_decode_block(FICContext *ctx, GetBitContext *gb, ...@@ -139,6 +139,9 @@ static int fic_decode_block(FICContext *ctx, GetBitContext *gb,
{ {
int i, num_coeff; int i, num_coeff;
if (get_bits_left(gb) < 8)
return AVERROR_INVALIDDATA;
/* Is it a skip block? */ /* Is it a skip block? */
if (get_bits1(gb)) { if (get_bits1(gb)) {
*is_p = 1; *is_p = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册