Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bartosz Kosiorek
wine
Commits
74dcea09
Commit
74dcea09
authored
1 year ago
by
Bartosz Kosiorek
Browse files
Options
Downloads
Patches
Plain Diff
Revert "win32u: Fix ExtCreateRegion when parameters are wrong."
This reverts commit
e1ea8c2f
.
parent
e1ea8c2f
No related branches found
No related tags found
No related merge requests found
Pipeline
#18490
failed
1 year ago
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dlls/gdi32/objects.c
+0
-5
0 additions, 5 deletions
dlls/gdi32/objects.c
dlls/gdi32/tests/clipping.c
+4
-1
4 additions, 1 deletion
dlls/gdi32/tests/clipping.c
dlls/win32u/region.c
+3
-4
3 additions, 4 deletions
dlls/win32u/region.c
with
7 additions
and
10 deletions
dlls/gdi32/objects.c
+
0
−
5
View file @
74dcea09
...
...
@@ -648,11 +648,6 @@ HRGN WINAPI ExtCreateRegion( const XFORM *xform, DWORD count, const RGNDATA *dat
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
}
if
((
data
->
rdh
.
nCount
==
1
)
&&
(
!
xform
))
{
const
PRECT
pRect
=
(
PRECT
)
&
data
->
Buffer
[
0
];
return
NtGdiCreateRectRgn
(
pRect
->
left
,
pRect
->
top
,
pRect
->
right
,
pRect
->
bottom
);
}
return
NtGdiExtCreateRegion
(
xform
,
count
,
data
);
}
...
...
This diff is collapsed.
Click to expand it.
dlls/gdi32/tests/clipping.c
+
4
−
1
View file @
74dcea09
...
...
@@ -260,9 +260,11 @@ static void test_ExtCreateRegion(void)
rgn
.
data
.
rdh
.
nCount
=
0
;
SetLastError
(
0xdeadbeef
);
hrgn
=
ExtCreateRegion
(
NULL
,
sizeof
(
RGNDATAHEADER
)
-
1
,
&
rgn
.
data
);
todo_wine
ok
(
!
hrgn
,
"ExtCreateRegion should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
||
(
GetLastError
()
==
0xdeadbeef
),
"0xdeadbeef, got %lu
\n
"
,
GetLastError
());
broken
(
GetLastError
()
==
0xdeadbeef
),
"0xdeadbeef, got %lu
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
hrgn
=
ExtCreateRegion
(
NULL
,
sizeof
(
rgn
),
&
rgn
.
data
);
...
...
@@ -293,6 +295,7 @@ static void test_ExtCreateRegion(void)
/* Buffer cannot be smaller than sizeof(RGNDATAHEADER) + 2 * sizeof(RECT) */
SetLastError
(
0xdeadbeef
);
hrgn
=
ExtCreateRegion
(
NULL
,
sizeof
(
RGNDATAHEADER
)
+
2
*
sizeof
(
RECT
)
-
1
,
&
rgn
.
data
);
todo_wine
ok
(
!
hrgn
,
"ExtCreateRegion should fail
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"0xdeadbeef, got %lu
\n
"
,
GetLastError
());
}
...
...
This diff is collapsed.
Click to expand it.
dlls/win32u/region.c
+
3
−
4
View file @
74dcea09
...
...
@@ -896,12 +896,11 @@ HRGN WINAPI NtGdiExtCreateRegion( const XFORM *xform, DWORD count, const RGNDATA
WINEREGION
*
obj
;
const
RECT
*
pCurRect
,
*
pEndRect
;
if
(
!
rgndata
||
rgndata
->
rdh
.
dwSize
<
sizeof
(
RGNDATAHEADER
)
||
(
count
<
sizeof
(
RGNDATAHEADER
)
+
rgndata
->
rdh
.
nCount
*
sizeof
(
RECT
)))
if
(
!
rgndata
||
rgndata
->
rdh
.
dwSize
<
sizeof
(
RGNDATAHEADER
))
return
0
;
/*
Up to Windows XP/2003, function return 0, if type is wrong
*/
if
(
rgndata
->
rdh
.
iType
!=
RDH_RECTANGLES
)
/*
XP doesn't care about the type
*/
if
(
rgndata
->
rdh
.
iType
!=
RDH_RECTANGLES
)
WARN
(
"(Unsupported region data type: %u)
\n
"
,
(
int
)
rgndata
->
rdh
.
iType
);
if
(
xform
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment