Merge commit 'a8a90906fb0ad0f8d3c68a97f182528ee3b5198c'
* commit 'a8a90906fb0ad0f8d3c68a97f182528ee3b5198c': mov: Correctly allocate ctts_data Conflicts: libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -2303,7 +2303,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
|||||||
if (entries >= UINT_MAX / sizeof(*sc->ctts_data))
|
if (entries >= UINT_MAX / sizeof(*sc->ctts_data))
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
av_freep(&sc->ctts_data);
|
av_freep(&sc->ctts_data);
|
||||||
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)
|
if (!sc->ctts_data)
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user