mxf: Fix a possible leak of extradata
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
This commit is contained in:
committed by
Luca Barbato
parent
1a4e4ad0e0
commit
0d6605c7ef
@@ -858,6 +858,8 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int
|
|||||||
default:
|
default:
|
||||||
/* Private uid used by SONY C0023S01.mxf */
|
/* Private uid used by SONY C0023S01.mxf */
|
||||||
if (IS_KLV_KEY(uid, mxf_sony_mpeg4_extradata)) {
|
if (IS_KLV_KEY(uid, mxf_sony_mpeg4_extradata)) {
|
||||||
|
av_free(descriptor->extradata);
|
||||||
|
descriptor->extradata_size = 0;
|
||||||
descriptor->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
|
descriptor->extradata = av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (!descriptor->extradata)
|
if (!descriptor->extradata)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
Reference in New Issue
Block a user