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
ee18ead5
Commit
ee18ead5
authored
Oct 06, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Fix a buffer size query in LsaLookupSids.
parent
9e166a96
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
lsa.c
dlls/advapi32/lsa.c
+5
-3
No files found.
dlls/advapi32/lsa.c
View file @
ee18ead5
...
@@ -483,7 +483,9 @@ NTSTATUS WINAPI LsaLookupSids(
...
@@ -483,7 +483,9 @@ NTSTATUS WINAPI LsaLookupSids(
(
*
Names
)[
i
].
Name
.
Length
=
0
;
(
*
Names
)[
i
].
Name
.
Length
=
0
;
(
*
Names
)[
i
].
Name
.
MaximumLength
=
0
;
(
*
Names
)[
i
].
Name
.
MaximumLength
=
0
;
(
*
Names
)[
i
].
Name
.
Buffer
=
NULL
;
(
*
Names
)[
i
].
Name
.
Buffer
=
NULL
;
if
(
LookupAccountSidW
(
NULL
,
Sids
[
i
],
NULL
,
&
name_size
,
NULL
,
&
domain_size
,
&
use
))
if
(
!
LookupAccountSidW
(
NULL
,
Sids
[
i
],
NULL
,
&
name_size
,
NULL
,
&
domain_size
,
&
use
)
&&
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
)
{
{
LSA_UNICODE_STRING
domain
;
LSA_UNICODE_STRING
domain
;
...
@@ -502,11 +504,11 @@ NTSTATUS WINAPI LsaLookupSids(
...
@@ -502,11 +504,11 @@ NTSTATUS WINAPI LsaLookupSids(
domain
.
Buffer
=
NULL
;
domain
.
Buffer
=
NULL
;
}
}
(
*
Names
)[
i
].
Use
=
use
;
(
*
Names
)[
i
].
Name
.
Length
=
(
name_size
-
1
)
*
sizeof
(
WCHAR
);
(
*
Names
)[
i
].
Name
.
Length
=
(
name_size
-
1
)
*
sizeof
(
WCHAR
);
(
*
Names
)[
i
].
Name
.
MaximumLength
=
name_size
*
sizeof
(
WCHAR
);
(
*
Names
)[
i
].
Name
.
MaximumLength
=
name_size
*
sizeof
(
WCHAR
);
(
*
Names
)[
i
].
Name
.
Buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
name_size
*
sizeof
(
WCHAR
));
(
*
Names
)[
i
].
Name
.
Buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
name_size
*
sizeof
(
WCHAR
));
LookupAccountSidW
(
NULL
,
Sids
[
i
],
(
*
Names
)[
i
].
Name
.
Buffer
,
&
name_size
,
domain
.
Buffer
,
&
domain_size
,
&
use
);
LookupAccountSidW
(
NULL
,
Sids
[
i
],
(
*
Names
)[
i
].
Name
.
Buffer
,
&
name_size
,
domain
.
Buffer
,
&
domain_size
,
&
use
);
(
*
Names
)[
i
].
Use
=
use
;
if
(
domain_size
)
if
(
domain_size
)
(
*
Names
)[
i
].
DomainIndex
=
build_domain
(
*
ReferencedDomains
,
&
domain
);
(
*
Names
)[
i
].
DomainIndex
=
build_domain
(
*
ReferencedDomains
,
&
domain
);
...
...
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