aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Härdin <tomas.hardin@codemill.se>2011-12-09 16:08:29 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-13 21:33:24 +0100
commit56934434466445919875f608aff7036573326352 (patch)
tree4f35773d9519d38de30e80c6ef178597f0a00059
parent57111c558e9f4785e5b6f203ddc4fd44da0694de (diff)
downloadffmpeg-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.c1
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);