Browse Source

mov: avoid a memleak when multiple stss boxes are present

CC: libav-stable@libav.org
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit 64f7575fbd)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n2.4.6
Anton Khirnov 11 years ago
parent
commit
577f1feb3f
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      libavformat/mov.c

+ 1
- 0
libavformat/mov.c View File

@@ -1702,6 +1702,7 @@ static int mov_read_stss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
}
if (entries >= UINT_MAX / sizeof(int))
return AVERROR_INVALIDDATA;
av_freep(&sc->keyframes);
sc->keyframes = av_malloc(entries * sizeof(int));
if (!sc->keyframes)
return AVERROR(ENOMEM);


Loading…
Cancel
Save