getgrent_next_nss (compat-initgroups): Remove alloca fallback [BZ #18023]
commit90d9d9ce2fbeef0f24a957efa83f5a78367a84d4
authorFlorian Weimer <fweimer@redhat.com>
Mon, 25 Jun 2018 16:56:42 +0000 (25 18:56 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 25 Jun 2018 16:58:49 +0000 (25 18:58 +0200)
tree05ebd40e8bb0e922dcedfabb37e1084b24de41b7
parent6b7b2abac75f969a86c537d64adf003378e24113
getgrent_next_nss (compat-initgroups): Remove alloca fallback [BZ #18023]

If the caller-supplied buffer is not large enough, fall back directly
malloc.

The previous __libc_use_alloca check was incorrect because it did not
take into account that extend_alloca may fail to merge allocations, so
it would underestimate the stack space being used by roughly a factor
of two.
ChangeLog
nss/nss_compat/compat-initgroups.c