Browse Source

mov: fix heap buffer overflow

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer 14 years ago
parent
commit
86e3289ffd
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mov.c

+ 1
- 1
libavformat/mov.c View File

@@ -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;


Loading…
Cancel
Save