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
56a65007
Commit
56a65007
authored
Nov 13, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 13, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Check whether region path points really fit into shorts.
parent
761391f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
16 deletions
+4
-16
region.c
dlls/gdiplus/region.c
+4
-2
region.c
dlls/gdiplus/tests/region.c
+0
-14
No files found.
dlls/gdiplus/region.c
View file @
56a65007
...
...
@@ -96,8 +96,10 @@ static BOOL is_integer_path(const GpPath *path)
for
(
i
=
0
;
i
<
path
->
pathdata
.
Count
;
i
++
)
{
if
(
path
->
pathdata
.
Points
[
i
].
X
!=
gdip_round
(
path
->
pathdata
.
Points
[
i
].
X
)
||
path
->
pathdata
.
Points
[
i
].
Y
!=
gdip_round
(
path
->
pathdata
.
Points
[
i
].
Y
))
short
x
,
y
;
x
=
gdip_round
(
path
->
pathdata
.
Points
[
i
].
X
);
y
=
gdip_round
(
path
->
pathdata
.
Points
[
i
].
Y
);
if
(
path
->
pathdata
.
Points
[
i
].
X
!=
(
REAL
)
x
||
path
->
pathdata
.
Points
[
i
].
Y
!=
(
REAL
)
y
)
return
FALSE
;
}
return
TRUE
;
...
...
dlls/gdiplus/tests/region.c
View file @
56a65007
...
...
@@ -617,44 +617,30 @@ static void test_getregiondata(void)
needed
=
0
;
status
=
GdipGetRegionDataSize
(
region
,
&
needed
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
todo_wine
expect
(
72
,
needed
);
memset
(
buf
,
0xee
,
sizeof
(
buf
));
needed
=
0
;
status
=
GdipGetRegionData
(
region
,
(
BYTE
*
)
buf
,
sizeof
(
buf
),
&
needed
);
ok
(
status
==
Ok
,
"status %08x
\n
"
,
status
);
todo_wine
expect
(
72
,
needed
);
todo_wine
expect_dword
(
buf
,
64
);
trace
(
"buf[1] = %08x
\n
"
,
buf
[
1
]);
expect_magic
(
buf
+
2
);
expect_dword
(
buf
+
3
,
0
);
expect_dword
(
buf
+
4
,
RGNDATA_PATH
);
todo_wine
expect_dword
(
buf
+
5
,
48
);
expect_magic
(
buf
+
6
);
expect_dword
(
buf
+
7
,
4
);
/* flags 0 means that a path is an array of FLOATs */
todo_wine
expect_dword
(
buf
+
8
,
0
);
todo_wine
expect_float
(
buf
+
9
,
-
196900
.
0
);
todo_wine
expect_float
(
buf
+
10
,
-
197400
.
0
);
todo_wine
expect_float
(
buf
+
11
,
2600
.
0
);
todo_wine
expect_float
(
buf
+
12
,
-
197400
.
0
);
todo_wine
expect_float
(
buf
+
13
,
2600
.
0
);
todo_wine
expect_float
(
buf
+
14
,
2300
.
0
);
todo_wine
expect_float
(
buf
+
15
,
-
196900
.
0
);
todo_wine
expect_float
(
buf
+
16
,
2300
.
0
);
todo_wine
expect_dword
(
buf
+
17
,
0x81010100
);
/* 0x01010100 if we don't close the path */
status
=
GdipDeletePath
(
path
);
...
...
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