aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-25 04:15:51 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-03-25 04:25:24 +0200
commit86e3289ffdec88f771ce8ec039ef5b90eb70b4cd (patch)
treed09ee97a9746d92e9350d90bcd942bea03c5e4ea /libavformat
parent4f16153d35920970fededa3a05bbfd9dd3bc69b0 (diff)
downloadffmpeg-86e3289ffdec88f771ce8ec039ef5b90eb70b4cd.tar.gz
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')
-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;