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
685e2fda
Commit
685e2fda
authored
Nov 10, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localspl: Use wcslen instead of lstrlenW.
parent
788f6b1b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
localmon.c
dlls/localspl/localmon.c
+3
-3
provider.c
dlls/localspl/provider.c
+0
-0
No files found.
dlls/localspl/localmon.c
View file @
685e2fda
...
@@ -498,7 +498,7 @@ static BOOL WINAPI localmon_OpenPortW(LPWSTR pName, PHANDLE phPort)
...
@@ -498,7 +498,7 @@ static BOOL WINAPI localmon_OpenPortW(LPWSTR pName, PHANDLE phPort)
type
=
get_type_from_local_name
(
pName
);
type
=
get_type_from_local_name
(
pName
);
if
(
!
type
)
return
FALSE
;
if
(
!
type
)
return
FALSE
;
port
=
heap_alloc
(
FIELD_OFFSET
(
port_t
,
nameW
[
lstrlenW
(
pName
)
+
1
]));
port
=
heap_alloc
(
FIELD_OFFSET
(
port_t
,
nameW
[
wcslen
(
pName
)
+
1
]));
if
(
!
port
)
return
FALSE
;
if
(
!
port
)
return
FALSE
;
port
->
type
=
type
;
port
->
type
=
type
;
...
@@ -679,7 +679,7 @@ static DWORD WINAPI localmon_XcvDataPort(HANDLE hXcv, LPCWSTR pszDataName, PBYTE
...
@@ -679,7 +679,7 @@ static DWORD WINAPI localmon_XcvDataPort(HANDLE hXcv, LPCWSTR pszDataName, PBYTE
ptr
=
((
xcv_t
*
)
hXcv
)
->
nameW
;
ptr
=
((
xcv_t
*
)
hXcv
)
->
nameW
;
}
}
lstrcpynW
(
buffer
,
ptr
,
ARRAY_SIZE
(
buffer
));
lstrcpynW
(
buffer
,
ptr
,
ARRAY_SIZE
(
buffer
));
if
(
buffer
[
0
])
buffer
[
lstrlenW
(
buffer
)
-
1
]
=
'\0'
;
/* remove the ':' */
if
(
buffer
[
0
])
buffer
[
wcslen
(
buffer
)
-
1
]
=
'\0'
;
/* remove the ':' */
res
=
SetDefaultCommConfigW
(
buffer
,
(
LPCOMMCONFIG
)
pInputData
,
cbInputData
);
res
=
SetDefaultCommConfigW
(
buffer
,
(
LPCOMMCONFIG
)
pInputData
,
cbInputData
);
TRACE
(
"got %lu with %lu
\n
"
,
res
,
GetLastError
()
);
TRACE
(
"got %lu with %lu
\n
"
,
res
,
GetLastError
()
);
return
res
?
ERROR_SUCCESS
:
GetLastError
();
return
res
?
ERROR_SUCCESS
:
GetLastError
();
...
@@ -710,7 +710,7 @@ static BOOL WINAPI localmon_XcvOpenPort(LPCWSTR pName, ACCESS_MASK GrantedAccess
...
@@ -710,7 +710,7 @@ static BOOL WINAPI localmon_XcvOpenPort(LPCWSTR pName, ACCESS_MASK GrantedAccess
TRACE
(
"%s, 0x%lx, %p)
\n
"
,
debugstr_w
(
pName
),
GrantedAccess
,
phXcv
);
TRACE
(
"%s, 0x%lx, %p)
\n
"
,
debugstr_w
(
pName
),
GrantedAccess
,
phXcv
);
/* No checks for any field is done in Windows */
/* No checks for any field is done in Windows */
xcv
=
heap_alloc
(
FIELD_OFFSET
(
xcv_t
,
nameW
[
lstrlenW
(
pName
)
+
1
]));
xcv
=
heap_alloc
(
FIELD_OFFSET
(
xcv_t
,
nameW
[
wcslen
(
pName
)
+
1
]));
if
(
xcv
)
{
if
(
xcv
)
{
xcv
->
GrantedAccess
=
GrantedAccess
;
xcv
->
GrantedAccess
=
GrantedAccess
;
lstrcpyW
(
xcv
->
nameW
,
pName
);
lstrcpyW
(
xcv
->
nameW
,
pName
);
...
...
dlls/localspl/provider.c
View file @
685e2fda
This diff is collapsed.
Click to expand it.
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