aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-15 23:37:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-15 23:37:09 +0200
commit689e59b7ffed34eba6159dcc78e87133862e3746 (patch)
treed26d9880f36ec9cc55c793d4e34c7b9a008a0f54
parent35e0496a7bb7243ce3574ab971bd489c7f7a0876 (diff)
downloadffmpeg-689e59b7ffed34eba6159dcc78e87133862e3746.tar.gz
mov: reset dref_count on realloc to keep values consistent.
This fixes a potential crash. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mov.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 004c4c47ea..93f369125a 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -401,6 +401,7 @@ static int mov_read_dref(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if (entries >= UINT_MAX / sizeof(*sc->drefs))
return AVERROR_INVALIDDATA;
av_free(sc->drefs);
+ sc->drefs_count = 0;
sc->drefs = av_mallocz(entries * sizeof(*sc->drefs));
if (!sc->drefs)
return AVERROR(ENOMEM);