fix a potential overflow with MALLOC_LIMIT

BUG=webp:321

Change-Id: Iab89dfe167fb394fcdffd3b2732d4ac9bef764b0
(cherry picked from commit 76bbcf2ed61d326bae3e37e1941e2a8674840462)
1 file changed