Commit 348319f5 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit 'a8a90906'

* commit 'a8a90906':
  mov: Correctly allocate ctts_data

Conflicts:
	libavformat/mov.c
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents c2876c01 a8a90906
...@@ -2303,7 +2303,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment