Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Härdin <tomas.hardin@codemill.se>2012-10-24 18:54:25 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-10-24 19:45:49 +0400
commitfbb39f44f1d37451be7d575b5923e6d5851aaecc (patch)
tree1d20defeacd849ed44de85e33efcf9ce72222888 /libavformat
parent1d22d269f54cc7e44f778bb6ffee96a172eb07a1 (diff)
mxfdec: Fix potential leak in mxf_read_local_tags()
This fixes CID 733800. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index d4ab49f119..5fca1a89a6 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1646,6 +1646,9 @@ static int mxf_read_local_tags(MXFContext *mxf, KLVPacket *klv, MXFMetadataReadF
/* Accept the 64k local set limit being exceeded (Avid). Don't accept
* it extending past the end of the KLV though (zzuf5.mxf). */
if (avio_tell(pb) > klv_end) {
+ if (ctx_size)
+ av_free(ctx);
+
av_log(mxf->fc, AV_LOG_ERROR,
"local tag %#04x extends past end of local set @ %#"PRIx64"\n",
tag, klv->offset);