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
5aec09e4
Commit
5aec09e4
authored
Nov 17, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Nov 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix invalid usage of CompareString in StrStr functions.
parent
766f587f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
string.c
dlls/shlwapi/string.c
+8
-4
No files found.
dlls/shlwapi/string.c
View file @
5aec09e4
...
...
@@ -364,7 +364,7 @@ int WINAPI StrCmpIW(LPCWSTR lpszStr, LPCWSTR lpszComp)
* PARAMS
* lpszStr [I] First string to compare
* lpszComp [I] Second string to compare
* iLen [I]
Maximum number of chars to compare.
* iLen [I]
Number of chars to compare
*
* RETURNS
* An integer less than, equal to or greater than 0, indicating that
...
...
@@ -395,7 +395,7 @@ INT WINAPI StrCmpNW(LPCWSTR lpszStr, LPCWSTR lpszComp, INT iLen)
* PARAMS
* lpszStr [I] First string to compare
* lpszComp [I] Second string to compare
* iLen [I]
Maximum number of chars to compare.
* iLen [I]
Number of chars to compare
*
* RETURNS
* An integer less than, equal to or greater than 0, indicating that
...
...
@@ -521,13 +521,15 @@ static LPSTR SHLWAPI_StrStrHelperA(LPCSTR lpszStr, LPCSTR lpszSearch,
INT
(
WINAPI
*
pStrCmpFn
)(
LPCSTR
,
LPCSTR
,
INT
))
{
size_t
iLen
;
LPCSTR
end
;
if
(
!
lpszStr
||
!
lpszSearch
||
!*
lpszSearch
)
return
NULL
;
iLen
=
strlen
(
lpszSearch
);
end
=
lpszStr
+
strlen
(
lpszStr
);
while
(
*
lpszStr
)
while
(
lpszStr
+
iLen
<=
end
)
{
if
(
!
pStrCmpFn
(
lpszStr
,
lpszSearch
,
iLen
))
return
(
LPSTR
)
lpszStr
;
...
...
@@ -670,6 +672,7 @@ LPSTR WINAPI StrStrIA(LPCSTR lpszStr, LPCSTR lpszSearch)
LPWSTR
WINAPI
StrStrIW
(
LPCWSTR
lpszStr
,
LPCWSTR
lpszSearch
)
{
int
iLen
;
LPCWSTR
end
;
TRACE
(
"(%s,%s)
\n
"
,
debugstr_w
(
lpszStr
),
debugstr_w
(
lpszSearch
));
...
...
@@ -677,8 +680,9 @@ LPWSTR WINAPI StrStrIW(LPCWSTR lpszStr, LPCWSTR lpszSearch)
return
NULL
;
iLen
=
strlenW
(
lpszSearch
);
end
=
lpszStr
+
strlenW
(
lpszStr
);
while
(
*
lpszStr
)
while
(
lpszStr
+
iLen
<=
end
)
{
if
(
!
StrCmpNIW
(
lpszStr
,
lpszSearch
,
iLen
))
return
(
LPWSTR
)
lpszStr
;
...
...
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