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
e2c06949
Commit
e2c06949
authored
Nov 18, 2014
by
Sebastian Lackner
Committed by
Alexandre Julliard
Nov 18, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix incorrect usage of CompareString in SYSLINK_ParseText.
parent
d5ba7451
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
syslink.c
dlls/comctl32/syslink.c
+24
-4
No files found.
dlls/comctl32/syslink.c
View file @
e2c06949
...
...
@@ -184,6 +184,26 @@ static VOID SYSLINK_ClearDoc (SYSLINK_INFO *infoPtr)
}
/***********************************************************************
* SYSLINK_StrCmpNIW
* Wrapper for StrCmpNIW to ensure 'len' is not too big.
*/
static
INT
SYSLINK_StrCmpNIW
(
LPCWSTR
str
,
LPCWSTR
comp
,
INT
len
)
{
INT
i
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
!
str
[
i
])
{
len
=
i
+
1
;
break
;
}
}
return
StrCmpNIW
(
str
,
comp
,
len
);
}
/***********************************************************************
* SYSLINK_ParseText
* Parses the window text string and creates a document. Returns the
* number of document items created.
...
...
@@ -203,7 +223,7 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
{
if
(
*
current
==
'<'
)
{
if
(
!
StrCmpNIW
(
current
,
SL_LINKOPEN
,
2
)
&&
(
CurrentType
==
slText
))
if
(
!
S
YSLINK_S
trCmpNIW
(
current
,
SL_LINKOPEN
,
2
)
&&
(
CurrentType
==
slText
))
{
BOOL
ValidParam
=
FALSE
,
ValidLink
=
FALSE
;
...
...
@@ -231,14 +251,14 @@ static UINT SYSLINK_ParseText (SYSLINK_INFO *infoPtr, LPCWSTR Text)
CheckParameter:
/* compare the current position with all known parameters */
if
(
!
StrCmpNIW
(
tmp
,
SL_HREF
,
6
))
if
(
!
S
YSLINK_S
trCmpNIW
(
tmp
,
SL_HREF
,
6
))
{
taglen
+=
6
;
ValidParam
=
TRUE
;
CurrentParameter
=
&
lpUrl
;
CurrentParameterLen
=
&
lenUrl
;
}
else
if
(
!
StrCmpNIW
(
tmp
,
SL_ID
,
4
))
else
if
(
!
S
YSLINK_S
trCmpNIW
(
tmp
,
SL_ID
,
4
))
{
taglen
+=
4
;
ValidParam
=
TRUE
;
...
...
@@ -312,7 +332,7 @@ CheckParameter:
}
}
}
else
if
(
!
StrCmpNIW
(
current
,
SL_LINKCLOSE
,
4
)
&&
(
CurrentType
==
slLink
)
&&
firsttag
)
else
if
(
!
S
YSLINK_S
trCmpNIW
(
current
,
SL_LINKCLOSE
,
4
)
&&
(
CurrentType
==
slLink
)
&&
firsttag
)
{
/* there's a <a...> tag opened, first add the previous text, if present */
if
(
textstart
!=
NULL
&&
textlen
>
0
&&
firsttag
>
textstart
)
...
...
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