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-03 12:10:24 +0200
commit1f7af6a9464159f957296b16c3286160a4a17e0f (patch)
treeabe0370dba847d50502250ce3a9d630969f57d6f
parent0b124172d831afc76fb5c3b30a1c74319f1a8abf (diff)
downloadffmpeg-1f7af6a9464159f957296b16c3286160a4a17e0f.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 c3ee7617f9..1e09950b0d 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -859,6 +859,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);