lavf/mov: ensure only one tkhd per trak
authorchcunningham <chcunningham@chromium.org>
Thu, 13 Dec 2018 21:58:40 +0000 (13:58 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 21 Jan 2019 06:53:26 +0000 (07:53 +0100)
commit54fbdacc3791a6c5ff5945b139c7221d466676b5
tree6aea0ef98522ee81c86cb3cc54ff669c0fa9f022
parent228f17ced3bd394677f0421f462067a0f287ca8c
lavf/mov: ensure only one tkhd per trak

Chromium fuzzing produced a whacky file with extra tkhds. This caused
an AVStream that was already in use to be corrupted by assigning it a
new id, which blows up later in mov_read_trun because the
MOVFragmentStreamInfo.index_entry now points OOB.

Reviewed-by: Baptiste Coudurier <baptiste.coudurier@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c9f7b6f7a9fdffa0ab8f3aa84a1f701cf5b3a6e9)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mov.c