Merge commit '577f1feb3fd1e51fd14af7ce6d79d468faa3b929' into release/2.4
* commit '577f1feb3fd1e51fd14af7ce6d79d468faa3b929': mov: avoid a memleak when multiple stss boxes are present Conflicts: libavformat/mov.c See:1b5d112406
See:5ab882d728
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user