avformat/mov: validate chunk_count vs stsc_data
authorchcunningham <chcunningham@chromium.org>
Thu, 7 Feb 2019 22:58:17 +0000 (14:58 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 8 Feb 2019 11:22:37 +0000 (12:22 +0100)
commit00cdf4e4e51750daa1e99ecbd49d6ee5f98dac51
tree000d228b3a776f7d1b7a6597023380eb799cbcaf
parentbcc71f30adc9de8b02f0b54636f02f20f71ef065
avformat/mov: validate chunk_count vs stsc_data

Bad content may contain stsc boxes with a first_chunk index that
exceeds stco.entries (chunk_count). This ammends the existing check to
include cases where chunk_count == 0. It also patches up the case
when stsc refers to unknown chunks, but stts has no samples (so we
can simply ignore stsc).

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1c15449ca9a5bfa387868ac55628397273da761f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mov.c