Commit 5c1e458b authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mxfdec: free duplicated utf16 strings

Fixes: memleak
Fixes: 23415/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5124814510751744
Suggested-by: 's avatarMarton Balint <cus@passwd.hu>
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0aa2768cb275bda9e9e1331ed95adc7cd686eafe)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8bdc64d4
......@@ -867,6 +867,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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment