+2008-04-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * grp.cc (internal_getgroups): Drop local buf. Allocate groups
+ directly using alloca.
+
2008-04-14 Corinna Vinschen <corinna@vinschen.de>
* postinstall: Fix copy/paste bug.
if (GetTokenInformation (hToken, TokenGroups, NULL, 0, &size)
|| GetLastError () == ERROR_INSUFFICIENT_BUFFER)
{
- char buf[size];
- TOKEN_GROUPS *groups = (TOKEN_GROUPS *) buf;
+ PTOKEN_GROUPS groups = (PTOKEN_GROUPS) alloca (size);
- if (GetTokenInformation (hToken, TokenGroups, buf, size, &size))
+ if (GetTokenInformation (hToken, TokenGroups, groups, size, &size))
{
cygsid sid;