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
397c2200
Commit
397c2200
authored
Apr 29, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 29, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Allocate temporary name buffer once.
parent
bc52f1c0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
lsa.c
dlls/advapi32/lsa.c
+3
-5
No files found.
dlls/advapi32/lsa.c
View file @
397c2200
...
...
@@ -371,6 +371,7 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
{
ULONG
i
,
sid_size_total
=
0
,
domain_size_max
=
0
,
size
,
domainname_size_total
=
0
;
ULONG
sid_size
,
domain_size
,
mapped
;
LSA_UNICODE_STRING
domain
;
BOOL
handled
=
FALSE
;
char
*
domain_data
;
SID_NAME_USE
use
;
...
...
@@ -414,13 +415,11 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
(
*
domains
)
->
Domains
=
(
LSA_TRUST_INFORMATION
*
)((
char
*
)
*
domains
+
sizeof
(
LSA_REFERENCED_DOMAIN_LIST
));
domain_data
=
(
char
*
)(
*
domains
)
->
Domains
+
sizeof
(
LSA_TRUST_INFORMATION
)
*
count
;
domain
.
Buffer
=
heap_alloc
(
domain_size_max
*
sizeof
(
WCHAR
));
for
(
i
=
0
;
i
<
count
;
i
++
)
{
LSA_UNICODE_STRING
domain
;
domain
.
Length
=
domain_size_max
*
sizeof
(
WCHAR
);
domain
.
MaximumLength
=
domain_size_max
*
sizeof
(
WCHAR
);
domain
.
Buffer
=
heap_alloc
(
domain
.
Length
);
(
*
sids
)[
i
].
Use
=
SidTypeUnknown
;
(
*
sids
)[
i
].
DomainIndex
=
-
1
;
...
...
@@ -444,9 +443,8 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
(
*
sids
)[
i
].
DomainIndex
=
lsa_reflist_add_domain
(
*
domains
,
&
domain
,
&
domain_data
);
}
}
heap_free
(
domain
.
Buffer
);
}
heap_free
(
domain
.
Buffer
);
if
(
mapped
==
count
)
return
STATUS_SUCCESS
;
if
(
mapped
>
0
&&
mapped
<
count
)
return
STATUS_SOME_NOT_MAPPED
;
...
...
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