aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2014-08-12 14:39:10 +0000
committerAnton Khirnov <anton@khirnov.net>2014-12-20 10:51:40 +0100
commit577f1feb3fd1e51fd14af7ce6d79d468faa3b929 (patch)
treefa34fad0936c2891b472bfe482c6da39cbbd1ccf
parent3ea49fc5081d63277ecbc12ed440af4b02ddfdf9 (diff)
downloadffmpeg-577f1feb3fd1e51fd14af7ce6d79d468faa3b929.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 (cherry picked from commit 64f7575fbd64e5b65d5c644347408588c776f1fe) Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r--libavformat/mov.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 3734689fd1..9077b7d042 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1702,6 +1702,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);