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
9e5936b3
Commit
9e5936b3
authored
Oct 22, 2012
by
André Hentschel
Committed by
Alexandre Julliard
Oct 23, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Fix out-of-bounds access (coverity).
parent
010e311b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
graphics.c
dlls/gdiplus/tests/graphics.c
+11
-13
No files found.
dlls/gdiplus/tests/graphics.c
View file @
9e5936b3
...
...
@@ -2948,7 +2948,7 @@ static void test_string_functions(void)
GpRegion
*
regions
[
4
];
BOOL
region_isempty
[
4
];
int
i
;
PointF
position
;
PointF
position
s
[
8
]
;
GpMatrix
*
identity
;
ok
(
hdc
!=
NULL
,
"Expected HDC to be initialized
\n
"
);
...
...
@@ -3186,24 +3186,22 @@ static void test_string_functions(void)
status
=
GdipCreateMatrix
(
&
identity
);
expect
(
Ok
,
status
);
position
.
X
=
0
;
position
.
Y
=
0
;
rc
.
X
=
0
;
rc
.
Y
=
0
;
rc
.
Width
=
0
;
rc
.
Height
=
0
;
status
=
GdipMeasureDriverString
(
NULL
,
teststring
,
6
,
font
,
&
position
,
memset
(
positions
,
0
,
sizeof
(
positions
));
status
=
GdipMeasureDriverString
(
NULL
,
teststring
,
6
,
font
,
positions
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
expect
(
InvalidParameter
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
NULL
,
6
,
font
,
&
position
,
status
=
GdipMeasureDriverString
(
graphics
,
NULL
,
6
,
font
,
positions
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
expect
(
InvalidParameter
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
NULL
,
&
position
,
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
NULL
,
positions
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
expect
(
InvalidParameter
,
status
);
...
...
@@ -3213,16 +3211,16 @@ static void test_string_functions(void)
identity
,
&
rc
);
expect
(
InvalidParameter
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
&
position
,
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
positions
,
0x100
,
identity
,
&
rc
);
expect
(
Ok
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
&
position
,
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
positions
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
NULL
,
&
rc
);
expect
(
Ok
,
status
);
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
&
position
,
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
positions
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
NULL
);
expect
(
InvalidParameter
,
status
);
...
...
@@ -3231,7 +3229,7 @@ static void test_string_functions(void)
rc
.
Y
=
0
;
rc
.
Width
=
0
;
rc
.
Height
=
0
;
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
&
position
,
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
6
,
font
,
positions
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
expect
(
Ok
,
status
);
...
...
@@ -3248,7 +3246,7 @@ static void test_string_functions(void)
rc
.
Y
=
0
;
rc
.
Width
=
0
;
rc
.
Height
=
0
;
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
4
,
font
,
&
position
,
status
=
GdipMeasureDriverString
(
graphics
,
teststring
,
4
,
font
,
positions
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
expect
(
Ok
,
status
);
...
...
@@ -3262,7 +3260,7 @@ static void test_string_functions(void)
rc
.
Y
=
0
;
rc
.
Width
=
0
;
rc
.
Height
=
0
;
status
=
GdipMeasureDriverString
(
graphics
,
teststring2
,
1
,
font
,
&
position
,
status
=
GdipMeasureDriverString
(
graphics
,
teststring2
,
1
,
font
,
positions
,
DriverStringOptionsCmapLookup
|
DriverStringOptionsRealizedAdvance
,
identity
,
&
rc
);
expect
(
Ok
,
status
);
...
...
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