projects
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f261a55
)
mov: Correctly allocate ctts_data
author
Luca Barbato
<lu_zero@gentoo.org>
Sun, 31 May 2015 10:28:33 +0000
(12:28 +0200)
committer
Luca Barbato
<lu_zero@gentoo.org>
Sun, 31 May 2015 11:05:12 +0000
(13:05 +0200)
It can be reallocated.
CC: libav-stable@libav.org
libavformat/mov.c
patch
|
blob
|
blame
|
history
diff --git
a/libavformat/mov.c
b/libavformat/mov.c
index
33e1054
..
fbbfef0
100644
(file)
--- a/
libavformat/mov.c
+++ b/
libavformat/mov.c
@@
-2035,7
+2035,7
@@
static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return 0;
if (entries >= UINT_MAX / sizeof(*sc->ctts_data))
return AVERROR_INVALIDDATA;
return 0;
if (entries >= UINT_MAX / sizeof(*sc->ctts_data))
return AVERROR_INVALIDDATA;
- sc->ctts_data = av_
malloc(
entries * sizeof(*sc->ctts_data));
+ sc->ctts_data = av_
realloc(NULL,
entries * sizeof(*sc->ctts_data));
if (!sc->ctts_data)
return AVERROR(ENOMEM);
if (!sc->ctts_data)
return AVERROR(ENOMEM);