summaryrefslogtreecommitdiff
path: root/libavformat/mxfdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-26 15:05:02 +0200
committerLuca Barbato <lu_zero@gentoo.org>2012-07-10 13:51:05 +0200
commitf39bbc9d2130bfb2b383c70105a6d54e6cadbbb5 (patch)
treedd8d56e8e310f8cdebcc4596cc86ce4225c998b3 /libavformat/mxfdec.c
parent83728d2d36721015fd000ed58216a73867281e69 (diff)
mxfdec: fix off by one error.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
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 796a97f2fe..a68b1a42ec 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1070,7 +1070,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;