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
8e73b48f
Commit
8e73b48f
authored
Dec 17, 2021
by
Esme Povirk
Committed by
Alexandre Julliard
Oct 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Reject invalid length in SetWindowPlacement.
parent
f91eb0a9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
win.c
dlls/user32/tests/win.c
+0
-2
window.c
dlls/win32u/window.c
+5
-0
No files found.
dlls/user32/tests/win.c
View file @
8e73b48f
...
...
@@ -12504,10 +12504,8 @@ static void test_window_placement(void)
wp
.
length
=
0
;
SetLastError
(
0xdeadbeef
);
ret
=
SetWindowPlacement
(
hwnd
,
&
wp
);
todo_wine
{
ok
(
!
ret
,
"SetWindowPlacement should have failed
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"wrong error %lu
\n
"
,
GetLastError
());
}
DestroyWindow
(
hwnd
);
}
...
...
dlls/win32u/window.c
View file @
8e73b48f
...
...
@@ -2567,6 +2567,11 @@ BOOL WINAPI NtUserSetWindowPlacement( HWND hwnd, const WINDOWPLACEMENT *wpl )
{
UINT
flags
=
PLACE_MAX
|
PLACE_RECT
;
if
(
!
wpl
)
return
FALSE
;
if
(
wpl
->
length
!=
sizeof
(
*
wpl
))
{
RtlSetLastWin32Error
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
(
wpl
->
flags
&
WPF_SETMINPOSITION
)
flags
|=
PLACE_MIN
;
return
set_window_placement
(
hwnd
,
wpl
,
flags
);
}
...
...
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