Commit 89cc8c17 authored by Tomas Härdin's avatar Tomas Härdin Committed by Michael Niedermayer

mxfdec: Check slice_count before freeing slice_offset_entries

This fixes SIGSEGV on sliceless (single stream) VBR files
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent c0ee522d
...@@ -1713,6 +1713,7 @@ static int mxf_read_close(AVFormatContext *s) ...@@ -1713,6 +1713,7 @@ static int mxf_read_close(AVFormatContext *s)
break; break;
case IndexTableSegment: case IndexTableSegment:
seg = (MXFIndexTableSegment *)mxf->metadata_sets[i]; seg = (MXFIndexTableSegment *)mxf->metadata_sets[i];
if (seg->slice_count)
for (j = 0; j < seg->nb_index_entries; j++) for (j = 0; j < seg->nb_index_entries; j++)
av_freep(&seg->slice_offset_entries[j]); av_freep(&seg->slice_offset_entries[j]);
av_freep(&seg->slice); av_freep(&seg->slice);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment