You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
mxfdec: return error if no segments are available in mxf_get_sorted_table_segments
Fixes CID732275.
This commit is contained in:
@@ -950,6 +950,9 @@ static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segment
|
||||
if (mxf->metadata_sets[i]->type == IndexTableSegment)
|
||||
nb_segments++;
|
||||
|
||||
if (!nb_segments)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
*sorted_segments = av_mallocz(nb_segments * sizeof(**sorted_segments));
|
||||
unsorted_segments = av_mallocz(nb_segments * sizeof(*unsorted_segments));
|
||||
if (!sorted_segments || !unsorted_segments) {
|
||||
|
Reference in New Issue
Block a user