Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4365b348
Commit
4365b348
authored
Mar 27, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Mar 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Allocate token information buffer dynamically.
parent
f0d1d61d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
msi.c
dlls/msi/tests/msi.c
+8
-4
No files found.
dlls/msi/tests/msi.c
View file @
4365b348
...
...
@@ -516,15 +516,19 @@ static void create_test_guid(LPSTR prodcode, LPSTR squashed)
static
void
get_user_sid
(
LPSTR
*
usersid
)
{
HANDLE
token
;
BYTE
buf
[
1024
];
DWORD
size
;
PTOKEN_USER
user
;
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
token
);
size
=
sizeof
(
buf
);
GetTokenInformation
(
token
,
TokenUser
,
buf
,
size
,
&
size
);
user
=
(
PTOKEN_USER
)
buf
;
size
=
0
;
GetTokenInformation
(
token
,
TokenUser
,
NULL
,
size
,
&
size
);
user
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
GetTokenInformation
(
token
,
TokenUser
,
user
,
size
,
&
size
);
pConvertSidToStringSidA
(
user
->
User
.
Sid
,
usersid
);
HeapFree
(
GetProcessHeap
(),
0
,
user
);
CloseHandle
(
token
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment