From: Michael Niedermayer Date: Mon, 26 Mar 2012 13:05:02 +0000 (+0200) Subject: mxfdec: fix off by one error. X-Git-Tag: android-x86-4.4-r1~12754 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3b370abf16044893b9f58212f5dbd3e4ae881a1d;p=android-x86%2Fexternal-ffmpeg.git mxfdec: fix off by one error. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer --- diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 85de3a7140..5910ccde22 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -1077,7 +1077,7 @@ static int mxf_edit_unit_absolute_offset(MXFContext *mxf, MXFIndexTable *index_t if (s->nb_index_entries == 2 * s->index_duration + 1) index *= 2; /* Avid index */ - if (index < 0 || index > s->nb_index_entries) { + if (index < 0 || index >= s->nb_index_entries) { av_log(mxf->fc, AV_LOG_ERROR, "IndexSID %i segment at %"PRId64" IndexEntryArray too small\n", index_table->index_sid, s->index_start_position); return AVERROR_INVALIDDATA;