Browse Source

avcodec/dstdec: Check read_table() for failure

Fixes: Timeout (too long -> 42sec)
Fixes: 18181/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DST_fuzzer-5736646250594304

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 03ea8d8cd4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.0.5
Michael Niedermayer 6 years ago
parent
commit
9317f94bd4
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      libavcodec/dstdec.c

+ 6
- 2
libavcodec/dstdec.c View File

@@ -298,11 +298,15 @@ static int decode_frame(AVCodecContext *avctx, void *data,

/* Filter Coef Sets (10.12) */

read_table(gb, &s->fsets, fsets_code_pred_coeff, 7, 9, 1, 0);
ret = read_table(gb, &s->fsets, fsets_code_pred_coeff, 7, 9, 1, 0);
if (ret < 0)
return ret;

/* Probability Tables (10.13) */

read_table(gb, &s->probs, probs_code_pred_coeff, 6, 7, 0, 1);
ret = read_table(gb, &s->probs, probs_code_pred_coeff, 6, 7, 0, 1);
if (ret < 0)
return ret;

/* Arithmetic Coded Data (10.11) */



Loading…
Cancel
Save