xmalloc: Add and use xcalloc
commit46b0ace509d9ed013915e9ab8013c7c712e11395
authorTobias Klauser <tklauser@distanz.ch>
Tue, 24 Jun 2014 17:06:05 +0000 (24 19:06 +0200)
committerTobias Klauser <tklauser@distanz.ch>
Wed, 25 Jun 2014 08:18:09 +0000 (25 10:18 +0200)
treea2882741a458995c1d3303bf87e6c88ea17724a2
parent6424dd90f721fd968c1159236f525ed59f355045
xmalloc: Add and use xcalloc

Add a wrapper for calloc which checks for integer overflows in the
calculation of the size to allocate.

Use xcalloc to allocate an array of objects instead of calculating the
size ourselves, which might cause an integer overflow.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
astraceroute.c
cpusched.c
curvetun_server.c
hash.c
ifpps.c
xmalloc.c
xmalloc.h