Skip to content
Snippets Groups Projects
Commit 86e3289f authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

mov: fix heap buffer overflow


Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 4f16153d
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment