aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-06-14 19:45:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 12:49:26 +0200
commitf6e7fbd510d53af2c7f727e03239569b95d333e2 (patch)
tree5debdab9d99a927d47f662b87e01911633d2b035 /libavformat
parent460bcdcd8447f0de870ed482f5efdca4c191b422 (diff)
downloadffmpeg-f6e7fbd510d53af2c7f727e03239569b95d333e2.tar.gz
avformat/mxfdec: free duplicated utf16 strings
Fixes: memleak Fixes: 23415/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5124814510751744 Suggested-by: Marton Balint <cus@passwd.hu> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0aa2768cb275bda9e9e1331ed95adc7cd686eafe) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 81800ce8c4..3a3ea92418 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -721,6 +721,7 @@ static inline int mxf_read_utf16_string(AVIOContext *pb, int size, char** str, i
return AVERROR(EINVAL);
buf_size = size + size / 2 + 1;
+ av_free(*str);
*str = av_malloc(buf_size);
if (!*str)
return AVERROR(ENOMEM);