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
e58a67e9
Commit
e58a67e9
authored
Sep 24, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Avoid accessing memory before the left hand string in compare_substring.
parent
c5ef45e5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
cond.y
dlls/msi/cond.y
+12
-2
No files found.
dlls/msi/cond.y
View file @
e58a67e9
...
...
@@ -462,11 +462,21 @@ static INT compare_substring( LPCWSTR a, INT operator, LPCWSTR b )
case
COND_LHS
:
return
0
==
strncmpW
(
a
,
b
,
lstrlenW
(
b
)
);
case
COND_RHS
:
return
0
==
lstrcmpW
(
a
+
(
lstrlenW
(
a
)
-
lstrlenW
(
b
)),
b
);
{
int
l
=
lstrlenW
(
a
);
int
r
=
lstrlenW
(
b
);
if
(
r
>
l
)
return
0
;
return
0
==
lstrcmpW
(
a
+
(
l
-
r
),
b
);
}
case
COND_ILHS
:
return
0
==
strncmpiW
(
a
,
b
,
lstrlenW
(
b
)
);
case
COND_IRHS
:
return
0
==
lstrcmpiW
(
a
+
(
lstrlenW
(
a
)
-
lstrlenW
(
b
)),
b
);
{
int
l
=
lstrlenW
(
a
);
int
r
=
lstrlenW
(
b
);
if
(
r
>
l
)
return
0
;
return
0
==
lstrcmpiW
(
a
+
(
l
-
r
),
b
);
}
default
:
ERR
(
"invalid substring operator
\n
"
);
return
0
;
...
...
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