1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mxfdec: Check slice_count before freeing slice_offset_entries

This fixes SIGSEGV on sliceless (single stream) VBR files

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Tomas Härdin 2011-12-09 16:08:29 +01:00 committed by Michael Niedermayer
parent c0ee522df6
commit 89cc8c17df

View File

@ -1713,6 +1713,7 @@ static int mxf_read_close(AVFormatContext *s)
break;
case IndexTableSegment:
seg = (MXFIndexTableSegment *)mxf->metadata_sets[i];
if (seg->slice_count)
for (j = 0; j < seg->nb_index_entries; j++)
av_freep(&seg->slice_offset_entries[j]);
av_freep(&seg->slice);