summaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorSteven Liu <lq@chinaffmpeg.org>2019-10-10 10:07:51 +0800
committerSteven Liu <lq@chinaffmpeg.org>2019-10-28 14:26:10 +0800
commit7a200089641b19b8cddbf844d9047be1d676cba8 (patch)
treeaf63281da156e746413022fbbb67d144999be104 /libavformat
parent22eae2d0c9fc5d5847bb7b64debe8d4b72fdff01 (diff)
downloadffmpeg-streaming-7a200089641b19b8cddbf844d9047be1d676cba8.zip
ffmpeg-streaming-7a200089641b19b8cddbf844d9047be1d676cba8.tar.gz
avformat/mpc8: fix memleak when seek table too big
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Steven Liu <lq@chinaffmpeg.org>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mpc8.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 0eb879f..e452cd6 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);
OpenPOWER on IntegriCloud