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
d5f2172c
Commit
d5f2172c
authored
Oct 11, 2009
by
Jeffrey Morlan
Committed by
Alexandre Julliard
Oct 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netapi32: Fix heap buffer overflows.
parent
bbfee006
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
access.c
dlls/netapi32/access.c
+3
-3
No files found.
dlls/netapi32/access.c
View file @
d5f2172c
...
...
@@ -112,7 +112,7 @@ static BOOL NETAPI_IsCurrentUser(LPCWSTR username)
BOOL
ret
=
FALSE
;
dwSize
=
LM20_UNLEN
+
1
;
curr_user
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
);
curr_user
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
*
sizeof
(
WCHAR
)
);
if
(
!
curr_user
)
{
ERR
(
"Failed to allocate memory for user name.
\n
"
);
...
...
@@ -431,7 +431,7 @@ NetUserGetLocalGroups(LPCWSTR servername, LPCWSTR username, DWORD level,
return
status
;
size
=
UNLEN
+
1
;
NetApiBufferAllocate
(
size
,
(
LPVOID
*
)
&
currentuser
);
NetApiBufferAllocate
(
size
*
sizeof
(
WCHAR
)
,
(
LPVOID
*
)
&
currentuser
);
GetUserNameW
(
currentuser
,
&
size
);
if
(
lstrcmpiW
(
username
,
currentuser
)
&&
NETAPI_FindUser
(
username
))
...
...
@@ -640,7 +640,7 @@ NetQueryDisplayInformation(
/* get data */
dwSize
=
UNLEN
+
1
;
NetApiBufferAllocate
(
dwSize
,
(
LPVOID
*
)
&
name
);
NetApiBufferAllocate
(
dwSize
*
sizeof
(
WCHAR
)
,
(
LPVOID
*
)
&
name
);
if
(
!
GetUserNameW
(
name
,
&
dwSize
))
{
NetApiBufferFree
(
name
);
...
...
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