[libav-commits] mov: Correctly allocate ctts_data
Module: libav Branch: release/11 Commit: 509a7003ec640c2aa7e5e1e08676f0109b7c2bb5 Author:Luca Barbato Committer: Luca Barbato Date: Sun May 31 12:28:33 2015 +0200 mov: Correctly allocate ctts_data It can be reallocated. CC: libav-sta...@libav.org --- libavformat/mov.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 60d171d..d7acd2c 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1880,7 +1880,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); ___ libav-commits mailing list libav-commits@libav.org https://lists.libav.org/mailman/listinfo/libav-commits
[libav-commits] mov: Correctly allocate ctts_data
Module: libav Branch: master Commit: a8a90906fb0ad0f8d3c68a97f182528ee3b5198c Author:Luca Barbato Committer: Luca Barbato Date: Sun May 31 12:28:33 2015 +0200 mov: Correctly allocate ctts_data It can be reallocated. CC: libav-sta...@libav.org --- 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); ___ libav-commits mailing list libav-commits@libav.org https://lists.libav.org/mailman/listinfo/libav-commits