1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

mov: Correctly allocate ctts_data

It can be reallocated.

CC: libav-stable@libav.org
This commit is contained in:
Luca Barbato 2015-05-31 12:28:33 +02:00
parent f261a55d72
commit a8a90906fb

View File

@ -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);