Convert code to use Xmallocarray() & Xreallocarray()

Provides automatic integer overflow checking in allocation size calculations

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
7 jobs for reallocarray in 2 minutes and 2 seconds (queued for 1 second)