libpayload:  Fix malloc allocation

Apparently the previous version worked on luck.  Fix the allocation
and add parens to better guide the compiler.  Also, halt() if 
the heap is poisoned (like by an overrun).  Finally, fix calloc()
so that it actually works.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Peter Stuge <peter@stuge.se>



git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3269 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
1 file changed
tree: 5305fda7cfdfff96c322c715c9c2bb1124b18f97
  1. documentation/
  2. payloads/
  3. src/
  4. targets/
  5. util/
  6. COPYING
  7. NEWS
  8. README