diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-23 00:30:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-31 00:24:38 +0100 |
commit | db1c4acd02af4de5dfbea6012c296470679aa7a6 (patch) | |
tree | 09b740ad9b82fdb463ba02d8d483f94467d78cbd /libavcodec/fic.c | |
parent | b559c58a03f88dcbf1e61875bb494743d4c6d081 (diff) | |
download | ffmpeg-db1c4acd02af4de5dfbea6012c296470679aa7a6.tar.gz |
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/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/fic.c')
-rw-r--r-- | libavcodec/fic.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/fic.c b/libavcodec/fic.c index 8833536330..65d102b86b 100644 --- a/libavcodec/fic.c +++ b/libavcodec/fic.c @@ -139,6 +139,9 @@ static int fic_decode_block(FICContext *ctx, GetBitContext *gb, { int i, num_coeff; + if (get_bits_left(gb) < 8) + return AVERROR_INVALIDDATA; + /* Is it a skip block? */ if (get_bits1(gb)) { *is_p = 1; |