Browse Source

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>
(cherry picked from commit db1c4acd02)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2.14
Michael Niedermayer 7 years ago
parent
commit
20337eb106
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/fic.c

+ 3
- 0
libavcodec/fic.c View File

@@ -138,6 +138,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)) {
/* This is a P-frame. */


Loading…
Cancel
Save