[FFmpeg-cvslog] mov: reset dref_count on realloc to keep values consistent.
Michael Niedermayer
git at videolan.org
Mon Apr 16 00:11:30 CEST 2012
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 15 23:37:09 2012 +0200| [689e59b7ffed34eba6159dcc78e87133862e3746] | committer: Michael Niedermayer
mov: reset dref_count on realloc to keep values consistent.
This fixes a potential crash.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=689e59b7ffed34eba6159dcc78e87133862e3746
---
libavformat/mov.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 004c4c4..93f3691 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);
More information about the ffmpeg-cvslog
mailing list