Use 64K buffers for TOKEN_GROUPS
A user token can be up to 64K in size. Using 32K buffers for TOKEN_GROUPS may be insufficient. * uinfo.cc (get_logon_sid): Use 64K buffers for the TOKEN_GROUPS array. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
155a1ec5fb
commit
fc504453fd
|
@ -1462,12 +1462,12 @@ get_logon_sid ()
|
|||
NTSTATUS status;
|
||||
ULONG size;
|
||||
tmp_pathbuf tp;
|
||||
PTOKEN_GROUPS groups = (PTOKEN_GROUPS) tp.c_get ();
|
||||
PTOKEN_GROUPS groups = (PTOKEN_GROUPS) tp.w_get ();
|
||||
|
||||
status = NtQueryInformationToken (hProcToken, TokenGroups, groups,
|
||||
NT_MAX_PATH, &size);
|
||||
2 * NT_MAX_PATH, &size);
|
||||
if (!NT_SUCCESS (status))
|
||||
debug_printf ("NtQueryInformationToken() %y", status);
|
||||
debug_printf ("NtQueryInformationToken (TokenGroups) %y", status);
|
||||
else
|
||||
{
|
||||
for (DWORD pg = 0; pg < groups->GroupCount; ++pg)
|
||||
|
|
Loading…
Reference in New Issue