Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2018-06-13 00:42:16 +0300
committerMarton Balint <cus@passwd.hu>2018-06-24 21:42:35 +0300
commit404dc6bab5cd1904daeb11affe3c67c02b8eec40 (patch)
tree4b1eccb6ac301bcf975a228d191e02df18971c26
parent865e0c2d66d954e14e4f7d5b9db8899b42a14867 (diff)
avformat/mxfdec: avoid index_table->nb_ptses overflow in mxf_compute_ptses_fake_index
Signed-off-by: Marton Balint <cus@passwd.hu>
-rw-r--r--libavformat/mxfdec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index fb400bf663..8c417aea26 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1528,6 +1528,12 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta
return 0; /* no TemporalOffsets */
}
+ if (s->index_duration > INT_MAX - index_table->nb_ptses) {
+ index_table->nb_ptses = 0;
+ av_log(mxf->fc, AV_LOG_ERROR, "ignoring IndexSID %d, duration is too large\n", s->index_sid);
+ return 0;
+ }
+
index_table->nb_ptses += s->index_duration;
}