Giovanni Mascellani : kernelbase: Fix an incorrect allocation size.
Module: wine Branch: oldstable Commit: 8506b2ae188243048cc897f7262a83bbea1e9884 URL: https://source.winehq.org/git/wine.git/?a=commit;h=8506b2ae188243048cc897f72... Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Tue Aug 10 16:40:12 2021 +0200 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(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> (cherry picked from commit 1ca54db1bfd05c46dbd3039ed5ad48d9d915f212) Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> --- dlls/kernelbase/security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kernelbase/security.c b/dlls/kernelbase/security.c index 36196304db3..472076cf7fe 100644 --- a/dlls/kernelbase/security.c +++ b/dlls/kernelbase/security.c @@ -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) ); }
participants (1)
-
Alexandre Julliard