Commit 0834f205 authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mxfdec: Fix memleak of packages_refs

Fixes: asan_static-oob_87d116_10_201.mxf
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent aae4f510
......@@ -624,6 +624,9 @@ static int mxf_read_content_storage(void *arg, AVIOContext *pb, int tag, int siz
MXFContext *mxf = arg;
switch (tag) {
case 0x1901:
if (mxf->packages_refs)
av_log(mxf->fc, AV_LOG_VERBOSE, "Multiple packages_refs\n");
av_free(mxf->packages_refs);
mxf->packages_count = avio_rb32(pb);
mxf->packages_refs = av_calloc(mxf->packages_count, sizeof(UID));
if (!mxf->packages_refs)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment