Giovanni Mascellani : kernelbase: Fix an incorrect allocation size.
Alexandre Julliard
julliard at winehq.org
Tue Aug 10 16:24:09 CDT 2021
Module: wine
Branch: master
Commit: 1ca54db1bfd05c46dbd3039ed5ad48d9d915f212
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1ca54db1bfd05c46dbd3039ed5ad48d9d915f212
Author: Giovanni Mascellani <gmascellani at 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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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) );
}
More information about the wine-cvs
mailing list