mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
update libavformat/mxfdec.c.
fix bug Signed-off-by: ziyugao <gaoziyu0614@outlook.com>
This commit is contained in:
parent
cc3e6314be
commit
5ace4c7119
@ -1885,6 +1885,10 @@ static int mxf_edit_unit_absolute_offset(MXFContext *mxf, MXFIndexTable *index_t
|
||||
return mxf_absolute_bodysid_offset(mxf, index_table->body_sid, offset_temp, offset_out, partition_out);
|
||||
} else {
|
||||
/* EditUnitByteCount == 0 for VBR indexes, which is fine since they use explicit StreamOffsets */
|
||||
if (s->edit_unit_byte_count && (s->index_duration > INT64_MAX / s->edit_unit_byte_count ||
|
||||
s->edit_unit_byte_count * s->index_duration > INT64_MAX - offset_temp)
|
||||
)
|
||||
return AVERROR_INVALIDDATA;
|
||||
offset_temp += s->edit_unit_byte_count * s->index_duration;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user