Merge commit '2620df13104ddaa136158eb6bb1195adbf9d7692'

* commit '2620df13104ddaa136158eb6bb1195adbf9d7692':
  mov: Free an earlier allocated array if allocating a new one

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-01-15 14:11:57 +01:00
commit fb37d03a87
1 changed files with 1 additions and 0 deletions

View File

@ -1913,6 +1913,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (entries >= UINT_MAX / sizeof(*sc->stts_data))
return -1;
av_free(sc->stts_data);
sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data));
if (!sc->stts_data)
return AVERROR(ENOMEM);