diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-11-18 08:51:20 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-12-15 01:01:22 +0100 |
commit | 2c2ee67fd36edaac88914e9d75e00f16a9a7cc17 (patch) | |
tree | 69bfa43849ae5025e04914484a65d6ce4d6f8104 /libavcodec | |
parent | c94cb8d9b21baeeecef962c72965dbedc4e0b0e1 (diff) | |
download | ffmpeg-2c2ee67fd36edaac88914e9d75e00f16a9a7cc17.tar.gz |
avcodec/apedec: Set error on error in ape_decode_value_3860()
Fixes: Timeout (unknown -> 15sec)
Fixes: 18808/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5677586072207360
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')
-rw-r--r-- | libavcodec/apedec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index f87131ab4f..1b23e54153 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -496,6 +496,7 @@ static inline int ape_decode_value_3860(APEContext *ctx, GetBitContext *gb, x = (overflow << rice->k) + get_bits(gb, rice->k); } else { av_log(ctx->avctx, AV_LOG_ERROR, "Too many bits: %"PRIu32"\n", rice->k); + ctx->error = 1; return AVERROR_INVALIDDATA; } rice->ksum += x - (rice->ksum + 8 >> 4); |