aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-01-31 22:42:54 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-10-06 13:54:16 +0200
commit7cc32a537b1003395bac7cb27fd7e72e130386c3 (patch)
tree54f5d5c2b191661fbbd25f2f1b4d129f7da11ab4
parent0ab6b4469caf11119546a58c538f7c55af77ab36 (diff)
downloadffmpeg-7cc32a537b1003395bac7cb27fd7e72e130386c3.tar.gz
avformat/cinedec: Fix index_entries size check
Fixes: out of array access Fixes: 29868/clusterfuzz-testcase-minimized-ffmpeg_dem_CINE_fuzzer-5692001957445632 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--libavformat/cinedec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c
index d27ebbba7b..b496af6d8f 100644
--- a/libavformat/cinedec.c
+++ b/libavformat/cinedec.c
@@ -284,7 +284,7 @@ static int cine_read_packet(AVFormatContext *avctx, AVPacket *pkt)
AVIOContext *pb = avctx->pb;
int n, size, ret;
- if (cine->pts >= st->duration)
+ if (cine->pts >= st->nb_index_entries)
return AVERROR_EOF;
avio_seek(pb, st->index_entries[cine->pts].pos, SEEK_SET);