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
5bb7590f
Commit
5bb7590f
authored
Mar 19, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
Mar 26, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10: Properly handle invalid arguments to ScriptBreak.
parent
c110a55f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
usp10.c
dlls/usp10/tests/usp10.c
+13
-0
usp10.c
dlls/usp10/usp10.c
+2
-1
No files found.
dlls/usp10/tests/usp10.c
View file @
5bb7590f
...
...
@@ -2798,6 +2798,19 @@ static void test_ScriptBreak(void)
hr
=
ScriptItemize
(
test
,
3
,
4
,
NULL
,
NULL
,
items
,
NULL
);
ok
(
!
hr
,
"ScriptItemize should return S_OK not %08x
\n
"
,
hr
);
/*
* This Test crashes pre Vista.
hr = ScriptBreak(test, 1, &items[0].a, NULL);
ok(hr == E_INVALIDARG, "ScriptBreak should return E_INVALIDARG not %08x\n", hr);
*/
hr
=
ScriptBreak
(
test
,
0
,
&
items
[
0
].
a
,
&
la
);
ok
(
hr
==
E_FAIL
||
broken
(
hr
==
S_OK
),
"ScriptBreak should return E_FAIL not %08x
\n
"
,
hr
);
hr
=
ScriptBreak
(
test
,
-
1
,
&
items
[
0
].
a
,
&
la
);
ok
(
hr
==
E_INVALIDARG
||
broken
(
hr
==
S_OK
),
"ScriptBreak should return E_INVALIDARG not %08x
\n
"
,
hr
);
memset
(
&
la
,
0
,
sizeof
(
la
));
hr
=
ScriptBreak
(
test
,
1
,
&
items
[
0
].
a
,
&
la
);
ok
(
!
hr
,
"ScriptBreak should return S_OK not %08x
\n
"
,
hr
);
...
...
dlls/usp10/usp10.c
View file @
5bb7590f
...
...
@@ -2665,7 +2665,8 @@ HRESULT WINAPI ScriptBreak(const WCHAR *chars, int count, const SCRIPT_ANALYSIS
{
TRACE
(
"(%s, %d, %p, %p)
\n
"
,
debugstr_wn
(
chars
,
count
),
count
,
sa
,
la
);
if
(
!
la
)
return
S_FALSE
;
if
(
count
<
0
||
!
la
)
return
E_INVALIDARG
;
if
(
count
==
0
)
return
E_FAIL
;
BREAK_line
(
chars
,
count
,
sa
,
la
);
...
...
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