[FFmpeg-cvslog] mxf: Fix a possible leak of extradata
Michael Niedermayer
git at videolan.org
Tue Jan 14 22:41:58 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Dec 11 14:43:47 2012 +0100| [0d6605c7ef43f97a88950542af09078adef33b6d] | committer: Luca Barbato
mxf: Fix a possible leak of extradata
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d6605c7ef43f97a88950542af09078adef33b6d
---
libavformat/mxfdec.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 7314dda..d3897fa 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -858,6 +858,8 @@ static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int
default:
/* Private uid used by SONY C0023S01.mxf */
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);
if (!descriptor->extradata)
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list