]> git.sesse.net Git - ffmpeg/commitdiff
avformat/mpc8: fix memleak when seek table too big
authorSteven Liu <lq@chinaffmpeg.org>
Thu, 10 Oct 2019 02:07:51 +0000 (10:07 +0800)
committerSteven Liu <lq@chinaffmpeg.org>
Mon, 28 Oct 2019 06:26:10 +0000 (14:26 +0800)
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
libavformat/mpc8.c

index 0eb879ffc0d959c67f8fc63ff042b4546567bb5c..e452cd6878f1fe5c71441ad3a990e28f0411abfc 100644 (file)
@@ -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);