[FFmpeg-cvslog] avformat/mpc8: fix memleak when seek table too big

Steven Liu git at videolan.org
Mon Oct 28 08:28:34 EET 2019


ffmpeg | branch: master | Steven Liu <lq at chinaffmpeg.org> | Thu Oct 10 10:07:51 2019 +0800| [7a200089641b19b8cddbf844d9047be1d676cba8] | committer: Steven Liu

avformat/mpc8: fix memleak when seek table too big

Reviewed-by: Michael Niedermayer <michael at niedermayer.cc>
Signed-off-by: Steven Liu <lq at chinaffmpeg.org>

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

 libavformat/mpc8.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 0eb879ffc0..e452cd6878 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -168,6 +168,7 @@ static void mpc8_parse_seektable(AVFormatContext *s, int64_t off)
     size = gb_get_v(&gb);
     if(size > UINT_MAX/4 || size > c->samples/1152){
         av_log(s, AV_LOG_ERROR, "Seek table is too big\n");
+        av_free(buf);
         return;
     }
     seekd = get_bits(&gb, 4);



More information about the ffmpeg-cvslog mailing list