mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +02:00
mxfdec: Fix potential leak in mxf_read_local_tags()
This fixes CID 733800. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
1d22d269f5
commit
fbb39f44f1
@ -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
|
/* Accept the 64k local set limit being exceeded (Avid). Don't accept
|
||||||
* it extending past the end of the KLV though (zzuf5.mxf). */
|
* it extending past the end of the KLV though (zzuf5.mxf). */
|
||||||
if (avio_tell(pb) > klv_end) {
|
if (avio_tell(pb) > klv_end) {
|
||||||
|
if (ctx_size)
|
||||||
|
av_free(ctx);
|
||||||
|
|
||||||
av_log(mxf->fc, AV_LOG_ERROR,
|
av_log(mxf->fc, AV_LOG_ERROR,
|
||||||
"local tag %#04x extends past end of local set @ %#"PRIx64"\n",
|
"local tag %#04x extends past end of local set @ %#"PRIx64"\n",
|
||||||
tag, klv->offset);
|
tag, klv->offset);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user