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
bc52f1c0
Commit
bc52f1c0
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: Fix allocation length for domain list (Valgrind).
parent
ad3a3c3e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
lsa.c
dlls/advapi32/lsa.c
+2
-1
lsa.c
dlls/advapi32/tests/lsa.c
+2
-0
No files found.
dlls/advapi32/lsa.c
View file @
bc52f1c0
...
...
@@ -405,7 +405,7 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
/* use maximum domain count */
if
(
!
(
*
domains
=
heap_alloc
(
sizeof
(
LSA_REFERENCED_DOMAIN_LIST
)
+
sizeof
(
LSA_TRUST_INFORMATION
)
*
count
+
sid_size_total
+
domainname_size_total
)))
sid_size_total
+
domainname_size_total
*
sizeof
(
WCHAR
)
)))
{
heap_free
(
*
sids
);
return
STATUS_NO_MEMORY
;
...
...
@@ -440,6 +440,7 @@ NTSTATUS WINAPI LsaLookupNames2( LSA_HANDLE policy, ULONG flags, ULONG count,
if
(
domain_size
)
{
domain
.
Length
=
domain_size
*
sizeof
(
WCHAR
);
domain
.
MaximumLength
=
(
domain_size
+
1
)
*
sizeof
(
WCHAR
);
(
*
sids
)[
i
].
DomainIndex
=
lsa_reflist_add_domain
(
*
domains
,
&
domain
,
&
domain_data
);
}
}
...
...
dlls/advapi32/tests/lsa.c
View file @
bc52f1c0
...
...
@@ -390,6 +390,8 @@ static void test_LsaLookupSids(void)
{
ok
((
char
*
)
list
->
Domains
-
(
char
*
)
list
>
0
,
"%p, %p
\n
"
,
list
,
list
->
Domains
);
ok
((
char
*
)
list
->
Domains
[
0
].
Sid
-
(
char
*
)
list
->
Domains
>
0
,
"%p, %p
\n
"
,
list
->
Domains
,
list
->
Domains
[
0
].
Sid
);
ok
(
list
->
Domains
[
0
].
Name
.
MaximumLength
>
list
->
Domains
[
0
].
Name
.
Length
,
"got %d, %d
\n
"
,
list
->
Domains
[
0
].
Name
.
MaximumLength
,
list
->
Domains
[
0
].
Name
.
Length
);
}
pLsaFreeMemory
(
names
);
...
...
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