summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-08-12 14:39:10 +0000
committerAnton Khirnov <anton@khirnov.net>2014-12-19 08:01:46 +0100
commit64f7575fbd64e5b65d5c644347408588c776f1fe (patch)
treee55ac51fb133e439a8b82b9ae7f830e7fc5bd613 /libavformat/mov.c
parent210461c0a83a5625560fa1d92229200dc7fb869b (diff)
downloadffmpeg-64f7575fbd64e5b65d5c644347408588c776f1fe.tar.gz
mov: avoid a memleak when multiple stss boxes are present
CC: libav-stable@libav.org Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 4590a2de74..aa81661c9a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1819,6 +1819,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
if (entries >= UINT_MAX / sizeof(int))
return AVERROR_INVALIDDATA;
+ av_freep(&sc->keyframes);
sc->keyframes = av_malloc(entries * sizeof(int));
if (!sc->keyframes)
return AVERROR(ENOMEM);