summaryrefslogtreecommitdiff
path: root/libavformat/cinedec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-01-31 22:42:54 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2021-03-13 21:02:31 +0100
commit09b304035423409ce18d731995fa3b921d54f9b5 (patch)
treed8a7f865ead0dad5da377be4e8e5546bb2dd401f /libavformat/cinedec.c
parent0c48c332eeb2866d9353125f701e099c48889463 (diff)
downloadffmpeg-09b304035423409ce18d731995fa3b921d54f9b5.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>
Diffstat (limited to 'libavformat/cinedec.c')
-rw-r--r--libavformat/cinedec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c
index c6c0d927ee..e5c6468c39 100644
--- a/libavformat/cinedec.c
+++ b/libavformat/cinedec.c
@@ -288,7 +288,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->internal->nb_index_entries)
return AVERROR_EOF;
avio_seek(pb, st->internal->index_entries[cine->pts].pos, SEEK_SET);