summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-26 15:05:02 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-26 15:05:02 +0200
commit3b370abf16044893b9f58212f5dbd3e4ae881a1d (patch)
tree5a085b94e89fcb3003c483e038fb43eba3154e02 /libavformat/mxfdec.c
parent3dc0b9d6dae6c533018e1750a8dd34ca57a69e0e (diff)
mxfdec: fix off by one error.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mxfdec.c')
-rw-r--r--libavformat/mxfdec.c2
1 files changed, 1 insertions, 1 deletions
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;