mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
mxfdemux: Fix up another size check and prevent allocating too much memory
This commit is contained in:
parent
31a2f2d5a1
commit
d3b45a145f
2 changed files with 3 additions and 2 deletions
|
@ -1771,7 +1771,7 @@ gst_mxf_demux_handle_generic_container_essence_element (GstMXFDemux * demux,
|
|||
|
||||
index->offset = demux->offset - demux->run_in;
|
||||
index->keyframe = keyframe;
|
||||
} else {
|
||||
} else if (etrack->position < G_MAXINT) {
|
||||
GstMXFDemuxIndex index;
|
||||
|
||||
index.offset = demux->offset - demux->run_in;
|
||||
|
|
|
@ -1224,7 +1224,8 @@ mxf_index_table_segment_parse (const MXFUL * ul,
|
|||
tag_data += 4;
|
||||
tag_size -= 4;
|
||||
|
||||
if (tag_size / 11 < len)
|
||||
if (tag_size / (11 + 4 * segment->slice_count +
|
||||
8 * segment->pos_table_count) < len)
|
||||
goto error;
|
||||
|
||||
segment->index_entries = g_new0 (MXFIndexEntry, len);
|
||||
|
|
Loading…
Reference in a new issue