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
9c238a5d
Commit
9c238a5d
authored
Aug 11, 2023
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wtsapi/tests: Use a heap buffer for the user SID.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55227
parent
fa038c3c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
wtsapi.c
dlls/wtsapi32/tests/wtsapi.c
+4
-3
No files found.
dlls/wtsapi32/tests/wtsapi.c
View file @
9c238a5d
...
...
@@ -68,8 +68,7 @@ static void check_wts_process_info(const WTS_PROCESS_INFOW *info, DWORD count)
for
(
i
=
0
;
i
<
count
;
i
++
)
{
char
sid_buffer
[
50
];
SID_AND_ATTRIBUTES
*
sid
=
(
SID_AND_ATTRIBUTES
*
)
sid_buffer
;
SID_AND_ATTRIBUTES
*
sid
;
const
SYSTEM_PROCESS_INFORMATION
*
nt_process
;
HANDLE
process
,
token
;
DWORD
size
;
...
...
@@ -88,11 +87,13 @@ static void check_wts_process_info(const WTS_PROCESS_INFOW *info, DWORD count)
if
((
process
=
OpenProcess
(
PROCESS_QUERY_INFORMATION
,
FALSE
,
info
[
i
].
ProcessId
)))
{
sid
=
malloc
(
50
);
ret
=
OpenProcessToken
(
process
,
TOKEN_QUERY
,
&
token
);
ok
(
ret
,
"failed to open token, error %lu
\n
"
,
GetLastError
());
ret
=
GetTokenInformation
(
token
,
TokenUser
,
sid
_buffer
,
sizeof
(
sid_buffer
)
,
&
size
);
ret
=
GetTokenInformation
(
token
,
TokenUser
,
sid
,
50
,
&
size
);
ok
(
ret
,
"failed to get token user, error %lu
\n
"
,
GetLastError
());
ok
(
EqualSid
(
info
[
i
].
pUserSid
,
sid
->
Sid
),
"SID did not match
\n
"
);
free
(
sid
);
CloseHandle
(
token
);
CloseHandle
(
process
);
}
...
...
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