lavf/mov: fix huge alloc in mov_read_ctts
authorJohn Stebbins <jstebbins@jetheaddev.com>
Sun, 26 Nov 2017 15:32:30 +0000 (07:32 -0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 7 Dec 2017 22:38:06 +0000 (23:38 +0100)
commitf7357facd8334863fd665b58d9b5487df4e9f583
tree7dcbc9efd56b8591ff28c606bd7f64e920413254
parented87667bd3d4bf45fb1bc173d2ba28b17add9145
lavf/mov: fix huge alloc in mov_read_ctts

An invalid file may cause huge alloc.  Delay expansion of ctts entries
until the number of samples is known in mov_build_index.

Fixes: 23

Found-by: zhao dongzhuo, AD-lab of Venustech
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2d015d3bf9fed59c65a3819a35fedbb8b7dde623)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavformat/mov.c