Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bbd71d6b
Commit
bbd71d6b
authored
Jan 29, 2014
by
André Hentschel
Committed by
Alexandre Julliard
Jan 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fix out of bounds access in DnsHostnameToComputerName[AW].
parent
2ef27a23
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
computername.c
dlls/kernel32/computername.c
+4
-4
No files found.
dlls/kernel32/computername.c
View file @
bbd71d6b
...
...
@@ -688,7 +688,7 @@ BOOL WINAPI DnsHostnameToComputerNameA(LPCSTR hostname,
if
(
len
>
MAX_COMPUTERNAME_LENGTH
)
len
=
MAX_COMPUTERNAME_LENGTH
;
if
(
*
size
<
len
)
if
(
*
size
<
len
+
1
)
{
*
size
=
len
;
return
FALSE
;
...
...
@@ -696,7 +696,7 @@ BOOL WINAPI DnsHostnameToComputerNameA(LPCSTR hostname,
if
(
!
computername
)
return
FALSE
;
memcpy
(
computername
,
hostname
,
len
);
computername
[
len
+
1
]
=
0
;
computername
[
len
]
=
0
;
return
TRUE
;
}
...
...
@@ -716,7 +716,7 @@ BOOL WINAPI DnsHostnameToComputerNameW(LPCWSTR hostname,
if
(
len
>
MAX_COMPUTERNAME_LENGTH
)
len
=
MAX_COMPUTERNAME_LENGTH
;
if
(
*
size
<
len
)
if
(
*
size
<
len
+
1
)
{
*
size
=
len
;
return
FALSE
;
...
...
@@ -724,6 +724,6 @@ BOOL WINAPI DnsHostnameToComputerNameW(LPCWSTR hostname,
if
(
!
computername
)
return
FALSE
;
memcpy
(
computername
,
hostname
,
len
*
sizeof
(
WCHAR
)
);
computername
[
len
+
1
]
=
0
;
computername
[
len
]
=
0
;
return
TRUE
;
}
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