[FFmpeg-cvslog] avformat/mxfdec: cleanup on "essence prior to first PartitionPack"
Michael Niedermayer
git at videolan.org
Fri Nov 8 15:54:34 EET 2019
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Oct 31 13:30:52 2019 +0100| [9802599ad0bef067d50ffc00b5e6b928589a7dd6] | committer: Michael Niedermayer
avformat/mxfdec: cleanup on "essence prior to first PartitionPack"
Fixes: memleak
Fixes: 18473/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5738557074833408
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9802599ad0bef067d50ffc00b5e6b928589a7dd6
---
libavformat/mxfdec.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 397f820b3f..bcee234ad7 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -3169,6 +3169,7 @@ static int mxf_read_header(AVFormatContext *s)
if (!mxf_read_sync(s->pb, mxf_header_partition_pack_key, 14)) {
av_log(s, AV_LOG_ERROR, "could not find header partition pack key\n");
+ //goto fail should not be needed as no metadata sets will have been parsed yet
return AVERROR_INVALIDDATA;
}
avio_seek(s->pb, -14, SEEK_CUR);
@@ -3199,7 +3200,8 @@ static int mxf_read_header(AVFormatContext *s)
if (!mxf->current_partition) {
av_log(mxf->fc, AV_LOG_ERROR, "found essence prior to first PartitionPack\n");
- return AVERROR_INVALIDDATA;
+ ret = AVERROR_INVALIDDATA;
+ goto fail;
}
if (!mxf->current_partition->first_essence_klv.offset)
More information about the ffmpeg-cvslog
mailing list