diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2011-12-09 16:08:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-13 21:33:24 +0100 |
commit | 56934434466445919875f608aff7036573326352 (patch) | |
tree | 4f35773d9519d38de30e80c6ef178597f0a00059 | |
parent | 57111c558e9f4785e5b6f203ddc4fd44da0694de (diff) | |
download | ffmpeg-56934434466445919875f608aff7036573326352.tar.gz |
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>
(cherry picked from commit 89cc8c17dfc2e49d2507eb72bfba10baba372d7f)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/mxfdec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 1f2782bade..2b2eb98a0c 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -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); |