if (fct.l == _nss_nonlocal_getgrnam_r)
status = NSS_STATUS_NOTFOUND;
else
- status = DL_CALL_FCT(fct.l, (name, &gbuf, buf, buflen, errnop));
+ status = DL_CALL_FCT(fct.l, (name, &gbuf, buf, len, errnop));
if (status == NSS_STATUS_TRYAGAIN && *errnop == ERANGE)
break;
} while (__nss_next(&nip, fct_name, &fct.ptr, status, 0) == 0);
if (newsize > limit)
newsize = limit;
}
- newgroups = realloc(*groupsp, *size * sizeof((*groupsp)[0]));
+ newgroups = realloc(*groupsp, newsize * sizeof((*groupsp)[0]));
if (newgroups == NULL) {
*errnop = ENOMEM;
errno = old_errno;