[FFmpeg-devel] [PATCH] avformat/mxfdec: Free all types for both Descriptors
Michael Niedermayer
michael at niedermayer.cc
Fri Jan 8 01:29:36 EET 2021
Fixes: memleak
Fixes: 26352/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5201158714687488
Suggested-by: Tomas Härdin <tjoppen at acc.umu.se>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/mxfdec.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index b563f2abe1..9570d9c3c7 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -344,11 +344,10 @@ static void mxf_free_metadataset(MXFMetadataSet **ctx, int freectx)
MXFIndexTableSegment *seg;
switch ((*ctx)->type) {
case Descriptor:
+ case MultipleDescriptor:
av_freep(&((MXFDescriptor *)*ctx)->extradata);
av_freep(&((MXFDescriptor *)*ctx)->mastering);
av_freep(&((MXFDescriptor *)*ctx)->coll);
- break;
- case MultipleDescriptor:
av_freep(&((MXFDescriptor *)*ctx)->sub_descriptors_refs);
break;
case Sequence:
--
2.17.1
More information about the ffmpeg-devel
mailing list