kernelbase: Fix an incorrect allocation size.
Variable nt_privs has type TOKEN_PRIVILEGES*, not TOKEN_GROUPS*. This fixes a crash in the Cyberpunk 2077 launcher. Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c5c9c58974
commit
1ca54db1bf
|
@ -667,7 +667,7 @@ BOOL WINAPI CreateRestrictedToken( HANDLE token, DWORD flags,
|
|||
|
||||
if (delete_priv_count)
|
||||
{
|
||||
if (!(nt_privs = heap_alloc( offsetof( TOKEN_GROUPS, Groups[delete_priv_count] ) ))) goto out;
|
||||
if (!(nt_privs = heap_alloc( offsetof( TOKEN_PRIVILEGES, Privileges[delete_priv_count] ) ))) goto out;
|
||||
nt_privs->PrivilegeCount = delete_priv_count;
|
||||
memcpy( nt_privs->Privileges, delete_privs, delete_priv_count * sizeof(*delete_privs) );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue