[FFmpeg-cvslog] mxfdec: Check slice_count before freeing slice_offset_entries

Tomas Härdin git at videolan.org
Mon Dec 12 18:35:40 CET 2011


ffmpeg | branch: master | Tomas Härdin <tomas.hardin at codemill.se> | Fri Dec  9 16:08:29 2011 +0100| [89cc8c17dfc2e49d2507eb72bfba10baba372d7f] | committer: Michael Niedermayer

mxfdec: Check slice_count before freeing slice_offset_entries

This fixes SIGSEGV on sliceless (single stream) VBR files

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89cc8c17dfc2e49d2507eb72bfba10baba372d7f
---

 libavformat/mxfdec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 1f2782b..2b2eb98 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);



More information about the ffmpeg-cvslog mailing list