avformat/mov: Break out early if chunk_count is 0 in mov_build_index()
authorMichael Niedermayer <michael@niedermayer.cc>
Tue, 15 May 2018 15:06:59 +0000 (17:06 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 9 Jul 2018 23:52:56 +0000 (01:52 +0200)
commit674929cd46c76285f4d739c0436a75a5402dee61
tree052128e653078ee236445f55fe3b61cf286281dc
parentf98794c73a7f90da43e06126e60a7bbda530fba7
avformat/mov: Break out early if chunk_count is 0 in mov_build_index()

Without this some operations might overflow (undefined behavior)
even though the index adding loop would never execute

No testcase known

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