aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-06-14 19:45:05 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-05 01:47:56 +0200
commit774efe1eceac5f22b859b1e2965f4d46fd6f35a0 (patch)
tree6961ab0bde1afb2eed710c4f9430f6e79c669f23
parent5fd3af45bc16cd7ca196d76b42765340ddf6d92e (diff)
downloadffmpeg-774efe1eceac5f22b859b1e2965f4d46fd6f35a0.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>
-rw-r--r--libavformat/mxfdec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 9c4d036043..eca4dfed9c 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -866,6 +866,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);