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
25b6493a
Commit
25b6493a
authored
Dec 09, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some sanity checks on window dimensions.
parent
50c1a6b9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
3 deletions
+22
-3
combo.c
dlls/user/combo.c
+5
-2
window.c
dlls/x11drv/window.c
+10
-0
winpos.c
dlls/x11drv/winpos.c
+7
-1
No files found.
dlls/user/combo.c
View file @
25b6493a
...
...
@@ -560,8 +560,11 @@ static LRESULT COMBO_Create( HWND hwnd, LPHEADCOMBO lphc, HWND hwndParent, LONG
if
(
CB_GETTYPE
(
lphc
)
==
CBS_DROPDOWN
)
lphc
->
droppedRect
.
left
+=
COMBO_EDITBUTTONSPACE
();
ClientToScreen
(
hwnd
,
(
LPPOINT
)
&
lphc
->
droppedRect
);
ClientToScreen
(
hwnd
,
(
LPPOINT
)
&
lphc
->
droppedRect
.
right
);
if
(
lphc
->
droppedRect
.
bottom
<
lphc
->
droppedRect
.
top
)
lphc
->
droppedRect
.
bottom
=
lphc
->
droppedRect
.
top
;
if
(
lphc
->
droppedRect
.
right
<
lphc
->
droppedRect
.
left
)
lphc
->
droppedRect
.
right
=
lphc
->
droppedRect
.
left
;
MapWindowPoints
(
hwnd
,
0
,
(
LPPOINT
)
&
lphc
->
droppedRect
,
2
);
}
/* create listbox popup */
...
...
dlls/x11drv/window.c
View file @
25b6493a
...
...
@@ -985,6 +985,16 @@ BOOL X11DRV_CreateWindow( HWND hwnd, CREATESTRUCTA *cs, BOOL unicode )
ERR
(
"invalid window height %d
\n
"
,
cs
->
cy
);
cs
->
cy
=
65535
;
}
if
(
cs
->
cx
<
0
)
{
ERR
(
"invalid window width %d
\n
"
,
cs
->
cx
);
cs
->
cx
=
0
;
}
if
(
cs
->
cy
<
0
)
{
ERR
(
"invalid window height %d
\n
"
,
cs
->
cy
);
cs
->
cy
=
0
;
}
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
data
))))
return
FALSE
;
data
->
whole_window
=
0
;
...
...
dlls/x11drv/winpos.c
View file @
25b6493a
...
...
@@ -426,7 +426,13 @@ static UINT SWP_DoNCCalcSize( WINDOWPOS* pWinpos, const RECT* pNewWindowRect, RE
TRACE
(
"(%ld,%ld)-(%ld,%ld)
\n
"
,
params
.
rgrc
[
0
].
left
,
params
.
rgrc
[
0
].
top
,
params
.
rgrc
[
0
].
right
,
params
.
rgrc
[
0
].
bottom
);
/* If the application send back garbage, ignore it */
/* If the application sends back garbage, ignore it */
if
(
params
.
rgrc
[
0
].
left
<
pNewWindowRect
->
left
)
params
.
rgrc
[
0
].
left
=
pNewWindowRect
->
left
;
if
(
params
.
rgrc
[
0
].
top
<
pNewWindowRect
->
top
)
params
.
rgrc
[
0
].
top
=
pNewWindowRect
->
top
;
if
(
params
.
rgrc
[
0
].
right
>
pNewWindowRect
->
right
)
params
.
rgrc
[
0
].
right
=
pNewWindowRect
->
right
;
if
(
params
.
rgrc
[
0
].
bottom
>
pNewWindowRect
->
bottom
)
params
.
rgrc
[
0
].
bottom
=
pNewWindowRect
->
bottom
;
if
(
params
.
rgrc
[
0
].
left
<=
params
.
rgrc
[
0
].
right
&&
params
.
rgrc
[
0
].
top
<=
params
.
rgrc
[
0
].
bottom
)
*
pNewClientRect
=
params
.
rgrc
[
0
];
...
...
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