mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
mov: fix heap buffer overflow
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4f16153d35
commit
86e3289ffd
@ -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…
Reference in New Issue
Block a user