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, 22 Oct 2018 23:44:40 +0000 (01:44 +0200)
commitb4024909c12118e0a128ada65b53c012296a2626
treeef5edc95f5027839aba23277c4b8923c6da72849
parentfe9c23bebbb2aa8e14eec9af1e99cabc8c5535ba
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