[FFmpeg-cvslog] mov: fix heap buffer overflow

Michael Niedermayer git at videolan.org
Sun Mar 25 04:59:19 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Mar 25 04:15:51 2012 +0200| [86e3289ffdec88f771ce8ec039ef5b90eb70b4cd] | committer: Michael Niedermayer

mov: fix heap buffer overflow

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=86e3289ffdec88f771ce8ec039ef5b90eb70b4cd
---

 libavformat/mov.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 785d284..0e9566f 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1830,7 +1830,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
 
         current_dts -= sc->dts_shift;
 
-        if (!sc->sample_count)
+        if (!sc->sample_count || st->nb_index_entries)
             return;
         if (sc->sample_count >= UINT_MAX / sizeof(*st->index_entries))
             return;



More information about the ffmpeg-cvslog mailing list