diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-08-12 14:39:10 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-12-20 11:15:47 +0100 |
commit | 0ceb2dffb6ba082a8abcc57c53a14b2512f0aa48 (patch) | |
tree | f47a46cb61a365615790a12fd3d37b2be74f7c42 | |
parent | 22103315c2a1cb2de336750c50cf6bf7c109220c (diff) | |
download | ffmpeg-0ceb2dffb6ba082a8abcc57c53a14b2512f0aa48.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>
(cherry picked from commit 577f1feb3fd1e51fd14af7ce6d79d468faa3b929)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 931f5b235112f1c2a09dead36f0a228061d23942)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 93f919d0b4c4341ccee366c98ac9af813f8fe622)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-rw-r--r-- | libavformat/mov.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index d59a66e798..a1de6526a0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1523,6 +1523,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; 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); |