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
6d098397
Commit
6d098397
authored
Feb 15, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Feb 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
usp10/tests: Avoid passing optional pointers to uninitialized structures in ScriptString tests.
parent
d790be79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
15 deletions
+6
-15
usp10.c
dlls/usp10/tests/usp10.c
+6
-15
No files found.
dlls/usp10/tests/usp10.c
View file @
6d098397
...
...
@@ -1229,10 +1229,7 @@ static void test_ScriptString(HDC hdc)
int
Charset
;
DWORD
Flags
=
SSA_GLYPHS
;
int
ReqWidth
=
100
;
SCRIPT_CONTROL
Control
;
SCRIPT_STATE
State
;
const
int
Dx
[
5
]
=
{
10
,
10
,
10
,
10
,
10
};
SCRIPT_TABDEF
Tabdef
;
const
BYTE
InClass
=
0
;
SCRIPT_STRING_ANALYSIS
ssa
=
NULL
;
...
...
@@ -1251,20 +1248,20 @@ static void test_ScriptString(HDC hdc)
Charset
=
-
1
;
/* this flag indicates unicode input */
/* Test without hdc to get E_PENDING */
hr
=
ScriptStringAnalyse
(
NULL
,
teststr
,
len
,
Glyphs
,
Charset
,
Flags
,
ReqWidth
,
&
Control
,
&
State
,
Dx
,
&
Tabdef
,
&
InClass
,
&
ssa
);
ReqWidth
,
NULL
,
NULL
,
Dx
,
NULL
,
&
InClass
,
&
ssa
);
ok
(
hr
==
E_PENDING
,
"ScriptStringAnalyse Stub should return E_PENDING not %08x
\n
"
,
hr
);
/* test with hdc, this should be a valid test */
hr
=
ScriptStringAnalyse
(
hdc
,
teststr
,
len
,
Glyphs
,
Charset
,
Flags
,
ReqWidth
,
&
Control
,
&
State
,
Dx
,
&
Tabdef
,
ReqWidth
,
NULL
,
NULL
,
Dx
,
NULL
,
&
InClass
,
&
ssa
);
ok
(
hr
==
S_OK
,
"ScriptStringAnalyse should return S_OK not %08x
\n
"
,
hr
);
ScriptStringFree
(
&
ssa
);
/* test makes sure that a call with a valid pssa still works */
hr
=
ScriptStringAnalyse
(
hdc
,
teststr
,
len
,
Glyphs
,
Charset
,
Flags
,
ReqWidth
,
&
Control
,
&
State
,
Dx
,
&
Tabdef
,
ReqWidth
,
NULL
,
NULL
,
Dx
,
NULL
,
&
InClass
,
&
ssa
);
ok
(
hr
==
S_OK
,
"ScriptStringAnalyse should return S_OK not %08x
\n
"
,
hr
);
ok
(
ssa
!=
NULL
,
"ScriptStringAnalyse pssa should not be NULL
\n
"
);
...
...
@@ -1309,9 +1306,6 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
int
Charset
=
-
1
;
/* unicode */
DWORD
Flags
=
SSA_GLYPHS
;
int
ReqWidth
=
100
;
SCRIPT_CONTROL
Control
;
SCRIPT_STATE
State
;
SCRIPT_TABDEF
Tabdef
;
const
BYTE
InClass
=
0
;
SCRIPT_STRING_ANALYSIS
ssa
=
NULL
;
...
...
@@ -1326,12 +1320,9 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
* Here we generate an SCRIPT_STRING_ANALYSIS that will be used as input to the
* following character positions to X and X to character position functions.
*/
memset
(
&
Control
,
0
,
sizeof
(
SCRIPT_CONTROL
));
memset
(
&
State
,
0
,
sizeof
(
SCRIPT_STATE
));
memset
(
&
Tabdef
,
0
,
sizeof
(
SCRIPT_TABDEF
));
hr
=
ScriptStringAnalyse
(
hdc
,
String
,
String_len
,
Glyphs
,
Charset
,
Flags
,
ReqWidth
,
&
Control
,
&
State
,
NULL
,
&
Tabdef
,
ReqWidth
,
NULL
,
NULL
,
NULL
,
NULL
,
&
InClass
,
&
ssa
);
ok
(
hr
==
S_OK
||
hr
==
E_INVALIDARG
,
/* NT */
...
...
@@ -1471,7 +1462,7 @@ static void test_ScriptStringXtoCP_CPtoX(HDC hdc)
* generate an SSA for the subsequent tests.
*/
hr
=
ScriptStringAnalyse
(
hdc
,
String
,
String_len
,
Glyphs
,
Charset
,
Flags
,
ReqWidth
,
&
Control
,
&
State
,
NULL
,
&
Tabdef
,
ReqWidth
,
NULL
,
NULL
,
NULL
,
NULL
,
&
InClass
,
&
ssa
);
ok
(
hr
==
S_OK
,
"ScriptStringAnalyse should return S_OK not %08x
\n
"
,
hr
);
...
...
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