summaryrefslogtreecommitdiff
path: root/libavformat
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-12 18:34:37 +0100
commit89cc8c17dfc2e49d2507eb72bfba10baba372d7f (patch)
tree3f165a95934548334884387e2b9e14638b6ef490 /libavformat
parentc0ee522df6c9ef09cdcb5bce7adb4b745aa6485a (diff)
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>
Diffstat (limited to 'libavformat')
-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);