[FFmpeg-cvslog] mov: Free an earlier allocated array if allocating a new one
Martin Storsjö
git at videolan.org
Mon Mar 10 18:24:33 CET 2014
ffmpeg | branch: release/0.10 | Martin Storsjö <martin at martin.st> | Mon Jan 13 14:46:07 2014 +0200| [2f4e066d66b37e48c6c11cc33649fb5c9656007d] | committer: Reinhard Tartler
mov: Free an earlier allocated array if allocating a new one
It could probably also be considered an error if the pointer isn't
null at this point, but then we might risk rejecting some
slightly broken files that we might have handled so far.
Sample-Id: 00000496-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 2620df13104ddaa136158eb6bb1195adbf9d7692)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
(cherry picked from commit a1b4d42d31ba700c97d4388153a2a553d71ca0ba)
Signed-off-by: Reinhard Tartler <siretart at tauware.de>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f4e066d66b37e48c6c11cc33649fb5c9656007d
---
libavformat/mov.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 2096988..28c89f1 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1630,6 +1630,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (entries >= UINT_MAX / sizeof(*sc->stts_data))
return AVERROR(EINVAL);
+ av_free(sc->stts_data);
sc->stts_data = av_malloc(entries * sizeof(*sc->stts_data));
if (!sc->stts_data)
return AVERROR(ENOMEM);
More information about the ffmpeg-cvslog
mailing list