mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-13 18:55:08 +00:00
mxfdec: return error if no segments are available in mxf_get_sorted_table_segments
Fixes CID732275.
This commit is contained in:
parent
35a35d49d2
commit
bd141f5ec9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user