mp4: check TRUN size before reading and allocation
commit398e5ff0411180d87a167cca665162fe8b767500
authorRémi Denis-Courmont <remi@remlab.net>
Fri, 24 Nov 2017 18:01:01 +0000 (24 20:01 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 24 Nov 2017 19:54:24 +0000 (24 21:54 +0200)
tree4aed2331d7d738aa262c95268a6c3baabeb8574b
parentc5b142bfde48b89537404ca6c3851a4ad1eaec1a
mp4: check TRUN size before reading and allocation

This fixes out-of-bound reads.
This avoids allocating stupid amounts of memory.

Note: there is still an infinite loop if count == 0xffffffff
(with a suitably enormous input).
modules/demux/mp4/libmp4.c