[FFmpeg-cvslog] avcodec/vlc: free multi on fail

Michael Niedermayer git at videolan.org
Tue Sep 26 13:46:38 EEST 2023


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Sep 20 02:30:33 2023 +0200| [768704b6406391b0d11fbccbcc54a36c938030ab] | committer: Paul B Mahol

avcodec/vlc: free multi on fail

Fixes: leak
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-6449246523752448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=768704b6406391b0d11fbccbcc54a36c938030ab
---

 libavcodec/vlc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/vlc.c b/libavcodec/vlc.c
index e5ec325327..dc8863855e 100644
--- a/libavcodec/vlc.c
+++ b/libavcodec/vlc.c
@@ -481,6 +481,7 @@ int ff_vlc_init_multi_from_lengths(VLC *vlc, VLC_MULTI *multi, int nb_bits, int
 fail:
     if (buf != localbuf)
         av_free(buf);
+    ff_vlc_free_multi(multi);
     return AVERROR_INVALIDDATA;
 }
 



More information about the ffmpeg-cvslog mailing list