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
e197332f
Commit
e197332f
authored
Apr 26, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed a few more strncpy calls.
parent
d70a253f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
8 deletions
+26
-8
graphctl.c
programs/taskmgr/graphctl.c
+2
-2
main.c
programs/winemine/main.c
+1
-1
hlp2sgml.c
programs/winhelp/hlp2sgml.c
+15
-0
hlpfile.c
programs/winhelp/hlpfile.c
+8
-5
No files found.
programs/taskmgr/graphctl.c
View file @
e197332f
...
...
@@ -153,14 +153,14 @@ void GraphCtrl_SetRange(TGraphCtrl* this, double dLower, double dUpper, int nDec
#if 0
void TGraphCtrl::SetXUnits(const char* string)
{
strncpy(m_strXUnitsString, string, sizeof(m_strXUnitsString) - 1
);
lstrcpynA(m_strXUnitsString, string, sizeof(m_strXUnitsString)
);
/* clear out the existing garbage, re-start with a clean plot */
InvalidateCtrl();
}
void TGraphCtrl::SetYUnits(const char* string)
{
strncpy(m_strYUnitsString, string, sizeof(m_strYUnitsString) - 1
);
lstrcpynA(m_strYUnitsString, string, sizeof(m_strYUnitsString)
);
/* clear out the existing garbage, re-start with a clean plot */
InvalidateCtrl();
}
...
...
programs/winemine/main.c
View file @
e197332f
...
...
@@ -336,7 +336,7 @@ void LoadBoard( BOARD *p_board )
if
(
RegQueryValueEx
(
hkey
,
key_name
,
NULL
,
(
LPDWORD
)
&
type
,
(
LPBYTE
)
data
,
(
LPDWORD
)
&
size
)
==
ERROR_SUCCESS
)
strncpy
(
p_board
->
best_name
[
i
],
data
,
sizeof
(
data
)
);
lstrcpynA
(
p_board
->
best_name
[
i
],
data
,
sizeof
(
p_board
->
best_name
[
i
]
)
);
else
LoadString
(
p_board
->
hInst
,
IDS_NOBODY
,
p_board
->
best_name
[
i
],
16
);
}
...
...
programs/winhelp/hlp2sgml.c
View file @
e197332f
...
...
@@ -392,3 +392,18 @@ LPSTR WINAPI lstrcpyA( LPSTR dst, LPCSTR src )
strcpy
(
dst
,
src
);
return
dst
;
}
LPSTR
WINAPI
lstrcpynA
(
LPSTR
dst
,
LPCSTR
src
,
INT
n
)
{
LPSTR
d
=
dst
;
LPCSTR
s
=
src
;
UINT
count
=
n
;
while
((
count
>
1
)
&&
*
s
)
{
count
--
;
*
d
++
=
*
s
++
;
}
if
(
count
)
*
d
=
0
;
return
dst
;
}
programs/winhelp/hlpfile.c
View file @
e197332f
...
...
@@ -1207,8 +1207,8 @@ static BOOL HLPFILE_ReadFont(HLPFILE* hlpfile)
if
(
idx
<
face_num
)
{
strn
cpy
(
hlpfile
->
fonts
[
i
].
LogFont
.
lfFaceName
,
ref
+
face_offset
+
idx
*
len
,
min
(
len
,
LF_FACESIZE
-
1
));
hlpfile
->
fonts
[
i
].
LogFont
.
lfFaceName
[
min
(
len
,
LF_FACESIZE
-
1
)
+
1
]
=
'\0'
;
mem
cpy
(
hlpfile
->
fonts
[
i
].
LogFont
.
lfFaceName
,
ref
+
face_offset
+
idx
*
len
,
min
(
len
,
LF_FACESIZE
-
1
));
hlpfile
->
fonts
[
i
].
LogFont
.
lfFaceName
[
min
(
len
,
LF_FACESIZE
-
1
)]
=
'\0'
;
}
else
{
...
...
@@ -1415,9 +1415,12 @@ static BOOL HLPFILE_SystemCommands(HLPFILE* hlpfile)
unsigned
flags
=
GET_USHORT
(
ptr
,
4
);
HLPFILE_WINDOWINFO
*
wi
=
&
hlpfile
->
windows
[
hlpfile
->
numWindows
-
1
];
if
(
flags
&
0x0001
)
strcpy
(
wi
->
type
,
ptr
+
6
);
else
wi
->
type
[
0
]
=
'\0'
;
if
(
flags
&
0x0002
)
strcpy
(
wi
->
name
,
ptr
+
16
);
else
wi
->
name
[
0
]
=
'\0'
;
if
(
flags
&
0x0004
)
strcpy
(
wi
->
caption
,
ptr
+
25
);
else
strncpy
(
wi
->
caption
,
hlpfile
->
lpszTitle
,
sizeof
(
wi
->
caption
));
if
(
flags
&
0x0001
)
strcpy
(
wi
->
type
,
ptr
+
6
);
else
wi
->
type
[
0
]
=
'\0'
;
if
(
flags
&
0x0002
)
strcpy
(
wi
->
name
,
ptr
+
16
);
else
wi
->
name
[
0
]
=
'\0'
;
if
(
flags
&
0x0004
)
strcpy
(
wi
->
caption
,
ptr
+
25
);
else
lstrcpynA
(
wi
->
caption
,
hlpfile
->
lpszTitle
,
sizeof
(
wi
->
caption
));
wi
->
origin
.
x
=
(
flags
&
0x0008
)
?
GET_USHORT
(
ptr
,
76
)
:
CW_USEDEFAULT
;
wi
->
origin
.
y
=
(
flags
&
0x0010
)
?
GET_USHORT
(
ptr
,
78
)
:
CW_USEDEFAULT
;
wi
->
size
.
cx
=
(
flags
&
0x0020
)
?
GET_USHORT
(
ptr
,
80
)
:
CW_USEDEFAULT
;
...
...
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