160
160
if (nmemb == 0 || size == 0)
161
161
errorx2(1, _("internal error, tried to erealloc3(0)"));
162
162
if (nmemb > SIZE_MAX / size)
163
errorx2(1, _("internal error, %s overflow"), "erealloc3()");
166
166
ptr = ptr ? realloc(ptr, size) : malloc(size);