forked from FFmpeg/FFmpeg
avformat/mxfdec: avoid index_table->nb_ptses overflow in mxf_compute_ptses_fake_index
Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
865e0c2d66
commit
404dc6bab5
1 changed files with 6 additions and 0 deletions
|
@ -1528,6 +1528,12 @@ static int mxf_compute_ptses_fake_index(MXFContext *mxf, MXFIndexTable *index_ta
|
||||||
return 0; /* no TemporalOffsets */
|
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;
|
index_table->nb_ptses += s->index_duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue