use reallocarray(NULL, a, b) instead of malloc(a, b), which gives us
proper mult int overflow detection.  The existing code already handles
malloc failure properly, of course.