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
584bdb18
Commit
584bdb18
authored
Jan 23, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winevdm: Don't use strncpy.
parent
d4989906
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
winevdm.c
programs/winevdm/winevdm.c
+7
-8
No files found.
programs/winevdm/winevdm.c
View file @
584bdb18
...
...
@@ -299,14 +299,13 @@ static BOOL read_pif_file( HANDLE hFile, char *progname, char *title,
}
}
/* prepare the return data */
strncpy
(
progname
,
pifheader
.
program
,
sizeof
(
pifheader
.
program
));
memcpy
(
title
,
pifheader
.
windowtitle
,
sizeof
(
pifheader
.
windowtitle
));
title
[
sizeof
(
pifheader
.
windowtitle
)
]
=
'\0'
;
lstrcpynA
(
progname
,
pifheader
.
program
,
sizeof
(
pifheader
.
program
)
+
1
);
lstrcpynA
(
title
,
pifheader
.
windowtitle
,
sizeof
(
pifheader
.
windowtitle
)
+
1
);
if
(
found386rec
)
strncpy
(
optparams
,
pif386rec
.
optparams
,
sizeof
(
pif386rec
.
optparams
)
);
lstrcpynA
(
optparams
,
pif386rec
.
optparams
,
sizeof
(
pif386rec
.
optparams
)
+
1
);
else
strncpy
(
optparams
,
pifheader
.
optparams
,
sizeof
(
pifheader
.
optparams
)
);
strncpy
(
startdir
,
pifheader
.
startdir
,
sizeof
(
pifheader
.
startdir
)
);
lstrcpynA
(
optparams
,
pifheader
.
optparams
,
sizeof
(
pifheader
.
optparams
)
+
1
);
lstrcpynA
(
startdir
,
pifheader
.
startdir
,
sizeof
(
pifheader
.
startdir
)
+
1
);
*
closeonexit
=
pifheader
.
hdrflags1
&
0x10
;
*
textmode
=
found386rec
?
pif386rec
.
videoflags
&
0x0010
:
pifheader
.
hdrflags1
&
0x0002
;
...
...
@@ -325,8 +324,8 @@ static VOID pif_cmd( char *filename, char *cmdline)
char
buf
[
128
];
char
progname
[
64
];
char
title
[
31
];
char
optparams
[
6
4
];
char
startdir
[
6
4
];
char
optparams
[
6
5
];
char
startdir
[
6
5
];
char
*
p
;
int
closeonexit
;
int
textmode
;
...
...
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