Fixes CID732275.
---
libavformat/mxfdec.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 9a61d02..25d18f4 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -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) {
--
1.7.12
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel