Merge commit '577f1feb3fd1e51fd14af7ce6d79d468faa3b929' into release/2.4

* commit '577f1feb3fd1e51fd14af7ce6d79d468faa3b929':
  mov: avoid a memleak when multiple stss boxes are present

Conflicts:
	libavformat/mov.c

See: 1b5d11240692025f036e945bc37968735679320a
See: 5ab882d7283f57560c889919c35f2688253b1d9c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-12-20 11:48:28 +01:00
commit 36e6842aa6

View File

@ -1851,8 +1851,10 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return 0;
}
if (sc->keyframes)
av_log(c->fc, AV_LOG_WARNING, "Duplicate STSS atom\n");
av_free(sc->keyframes);
av_log(c->fc, AV_LOG_WARNING, "Duplicated STSS atom\n");
if (entries >= UINT_MAX / sizeof(int))
return AVERROR_INVALIDDATA;
av_freep(&sc->keyframes);
sc->keyframe_count = 0;
sc->keyframes = av_malloc_array(entries, sizeof(*sc->keyframes));
if (!sc->keyframes)