vpx_mem: add basic size check
authorJames Zern <jzern@google.com>
Wed, 24 Aug 2016 04:06:36 +0000 (21:06 -0700)
committerJames Zern <jzern@google.com>
Thu, 25 Aug 2016 02:22:57 +0000 (19:22 -0700)
commit4699aca87fad249d38018abba30ecd51143a1257
tree2cccea28775fbb3a6318c42ea69c422925cdb1e8
parent963291217f9b06c8fe0f8bbc5553d490d14164c4
vpx_mem: add basic size check

set a max allocable size to prevent overflows in 32-bit and extremely
large allocation attempts in 64-bit. this could be amended to allow size
or num parameters to be 64-bits with the correct size being used at each
call site.

BUG=webm:819

Change-Id: Ia81004d6c4279680714c4488b4f6cf287ab396a5
vpx_mem/vpx_mem.c