[FFmpeg-cvslog] mov: avoid a memleak when multiple stss boxes are present
Anton Khirnov
git at videolan.org
Fri Dec 19 12:39:44 CET 2014
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Aug 12 14:39:10 2014 +0000| [64f7575fbd64e5b65d5c644347408588c776f1fe] | committer: Anton Khirnov
mov: avoid a memleak when multiple stss boxes are present
CC: libav-stable at libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=64f7575fbd64e5b65d5c644347408588c776f1fe
---
libavformat/mov.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 4590a2d..aa81661 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);
More information about the ffmpeg-cvslog
mailing list