diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2012-10-24 16:54:25 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-24 17:45:49 +0200 |
commit | fbb39f44f1d37451be7d575b5923e6d5851aaecc (patch) | |
tree | 1d20defeacd849ed44de85e33efcf9ce72222888 /libavformat/mxfdec.c | |
parent | 1d22d269f54cc7e44f778bb6ffee96a172eb07a1 (diff) | |
download | ffmpeg-fbb39f44f1d37451be7d575b5923e6d5851aaecc.tar.gz |
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/mxfdec.c')
-rw-r--r-- | libavformat/mxfdec.c | 3 |
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); |