aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-10-15 23:40:21 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-09 15:57:33 +0100
commit03ea8d8cd45e55eeb9675c38184dc2149710a557 (patch)
tree5bf67f77c9ffd55f6829e69de1ee43d665f8c73e
parent2a8785966ca18bac2dae6de66df4d92f7f66b6a3 (diff)
downloadffmpeg-03ea8d8cd45e55eeb9675c38184dc2149710a557.tar.gz
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>
-rw-r--r--libavcodec/dstdec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c
index 48271b10f7..e0519d2a0b 100644
--- a/libavcodec/dstdec.c
+++ b/libavcodec/dstdec.c
@@ -302,11 +302,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) */