summaryrefslogtreecommitdiff
path: root/libavcodec/arbc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-04-14 11:03:06 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-04-24 17:05:02 +0200
commit8b10f09fd537aa1d8d775a04f3f294c30986ab07 (patch)
tree5715b4074622033b4b3b0bb28b14352f91dd7725 /libavcodec/arbc.c
parent6f0e9a863466bfcbd75ee15d4d8a6aad2a5126a4 (diff)
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/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/arbc.c')
-rw-r--r--libavcodec/arbc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/arbc.c b/libavcodec/arbc.c
index a8b0bb0d8b..08d3a0ae6b 100644
--- a/libavcodec/arbc.c
+++ b/libavcodec/arbc.c
@@ -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;