Commit 8b10f09f authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/arbc: Skip unchanged frames

Fixes: Timeout (16sec -> 5sec)
Fixes: 14128/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ARBC_fuzzer-5767365721063424

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 6f0e9a86
......@@ -121,7 +121,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
bytestream2_skip(&s->gb, 8);
nb_segments = bytestream2_get_le16(&s->gb);
if (nb_segments == 0)
keyframe = 0;
return avpkt->size;
if (7 * nb_segments > bytestream2_get_bytes_left(&s->gb))
return AVERROR_INVALIDDATA;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment