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
741fe13d
Commit
741fe13d
authored
Aug 31, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Silence buffer overflow gcc warnings.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5c37020a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
oldconfig.c
dlls/kernel32/oldconfig.c
+6
-3
No files found.
dlls/kernel32/oldconfig.c
View file @
741fe13d
...
...
@@ -290,7 +290,8 @@ static void create_hardware_branch(void)
{
if
(
strncmp
(
dent
->
d_name
,
"hd"
,
2
)
==
0
)
{
sprintf
(
cStr
,
procname_ide_media
,
dent
->
d_name
);
if
(
snprintf
(
cStr
,
sizeof
(
cStr
),
procname_ide_media
,
dent
->
d_name
)
>=
sizeof
(
cStr
))
continue
;
procfile
=
fopen
(
cStr
,
"r"
);
if
(
!
procfile
)
{
...
...
@@ -306,7 +307,8 @@ static void create_hardware_branch(void)
if
(
nType
==
DRIVE_UNKNOWN
)
continue
;
}
sprintf
(
cStr
,
procname_ide_model
,
dent
->
d_name
);
if
(
snprintf
(
cStr
,
sizeof
(
cStr
),
procname_ide_model
,
dent
->
d_name
)
>=
sizeof
(
cStr
))
continue
;
procfile
=
fopen
(
cStr
,
"r"
);
if
(
!
procfile
)
{
...
...
@@ -322,7 +324,8 @@ static void create_hardware_branch(void)
cDevModel
[
strlen
(
cDevModel
)
-
1
]
=
0
;
}
sprintf
(
cUnixDeviceName
,
"/dev/%s"
,
dent
->
d_name
);
if
(
snprintf
(
cUnixDeviceName
,
sizeof
(
cUnixDeviceName
),
"/dev/%s"
,
dent
->
d_name
)
>=
sizeof
(
cUnixDeviceName
))
continue
;
scsi_addr
.
PortNumber
=
(
dent
->
d_name
[
2
]
-
'a'
)
/
2
;
scsi_addr
.
PathId
=
0
;
scsi_addr
.
TargetId
=
(
dent
->
d_name
[
2
]
-
'a'
)
%
2
;
...
...
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