diff --git a/dlls/advapi32/security.c b/dlls/advapi32/security.c index d62bb23e4c2..38ca284462e 100644 --- a/dlls/advapi32/security.c +++ b/dlls/advapi32/security.c @@ -2721,7 +2721,7 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI nameLen = UNLEN + 1; - userName = HeapAlloc(GetProcessHeap(), 0, nameLen); + userName = HeapAlloc(GetProcessHeap(), 0, nameLen*sizeof(WCHAR)); if (GetUserNameW(userName, &nameLen) && !strcmpW(lpAccountName, userName)) ret = lookup_user_account_name(Sid, cbSid, ReferencedDomainName,