Defensively guard against calling malloc() with a size of zero.