mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
avformat/id3v2: Free buffer in decode_str()
Fixes: memleak Fixes: 60058/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5665259244093440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
f9b29451e4
commit
c41ab871c7
@ -309,8 +309,10 @@ static int decode_str(AVFormatContext *s, AVIOContext *pb, int encoding,
|
||||
avio_w8(dynbuf, 0);
|
||||
|
||||
dynsize = avio_close_dyn_buf(dynbuf, dst);
|
||||
if (dynsize <= 0)
|
||||
if (dynsize <= 0) {
|
||||
av_freep(dst);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
*maxread = left;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user