Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-25 06:15:51 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-03-25 06:25:24 +0400
commit86e3289ffdec88f771ce8ec039ef5b90eb70b4cd (patch)
treed09ee97a9746d92e9350d90bcd942bea03c5e4ea /libavformat/mov.c
parent4f16153d35920970fededa3a05bbfd9dd3bc69b0 (diff)
mov: fix heap buffer overflow
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 785d284b86..0e9566fe3a 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;