[FFmpeg-cvslog] mov: Correctly allocate ctts_data

Luca Barbato git at videolan.org
Mon Jun 1 00:43:58 CEST 2015


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Sun May 31 12:28:33 2015 +0200| [a8a90906fb0ad0f8d3c68a97f182528ee3b5198c] | committer: Luca Barbato

mov: Correctly allocate ctts_data

It can be reallocated.

CC: libav-stable at libav.org

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a8a90906fb0ad0f8d3c68a97f182528ee3b5198c
---

 libavformat/mov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 33e1054..fbbfef0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2035,7 +2035,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         return 0;
     if (entries >= UINT_MAX / sizeof(*sc->ctts_data))
         return AVERROR_INVALIDDATA;
-    sc->ctts_data = av_malloc(entries * sizeof(*sc->ctts_data));
+    sc->ctts_data = av_realloc(NULL, entries * sizeof(*sc->ctts_data));
     if (!sc->ctts_data)
         return AVERROR(ENOMEM);
 



More information about the ffmpeg-cvslog mailing list