Added patch to ignore width/height passed to edit control in WM_SIZE message.

This commit is contained in:
Sebastian Lackner 2015-09-27 15:33:11 +02:00
parent 8a0c14b145
commit e499f1c187
5 changed files with 59 additions and 1 deletions

View File

@ -39,10 +39,11 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [6]:**
**Bug fixes and features included in the next upcoming release [7]:**
* Add implementation for msidb commandline tool
* Codepage conversion should fail when destination length is < 0
* Do not trust width/height passed to edit control in WM_SIZE message ([Wine Bug #37542](https://bugs.winehq.org/show_bug.cgi?id=37542))
* Fix calculation of listbox size when horizontal scrollbar is present ([Wine Bug #38142](https://bugs.winehq.org/show_bug.cgi?id=38142))
* Implement semi-stub for d3d8 swapchain effect D3DSWAPEFFECT_COPY_VSYNC ([Wine Bug #37587](https://bugs.winehq.org/show_bug.cgi?id=37587))
* Reduce stack usage of virtual memory functions ([Wine Bug #34558](https://bugs.winehq.org/show_bug.cgi?id=34558))

2
debian/changelog vendored
View File

@ -11,6 +11,8 @@ wine-staging (1.7.52) UNRELEASED; urgency=low
* Added patch to reduce stack usage of virtual memory functions.
* Added patch to fix calculation of listbox size when horizontal scrollbar is
present.
* Added patch to ignore width/height passed to edit control in WM_SIZE
message.
* Removed patch to fix possible memory leak in netprofm init_networks (fixed
upstream).
* Removed patch for stub of dwmapi.DwmUpdateThumbnailProperties (accepted

View File

@ -269,6 +269,7 @@ patch_enable_all ()
enable_user32_DeferWindowPos="$1"
enable_user32_Dialog_Paint_Event="$1"
enable_user32_DrawTextExW="$1"
enable_user32_Edit_Control_Resize="$1"
enable_user32_GetSystemMetrics="$1"
enable_user32_Invalidate_Key_State="$1"
enable_user32_ListBox_Size="$1"
@ -903,6 +904,9 @@ patch_enable ()
user32-DrawTextExW)
enable_user32_DrawTextExW="$2"
;;
user32-Edit_Control_Resize)
enable_user32_Edit_Control_Resize="$2"
;;
user32-GetSystemMetrics)
enable_user32_GetSystemMetrics="$2"
;;
@ -5297,6 +5301,21 @@ if test "$enable_user32_DrawTextExW" -eq 1; then
) >> "$patchlist"
fi
# Patchset user32-Edit_Control_Resize
# |
# | This patchset fixes the following Wine bugs:
# | * [#37542] Do not trust width/height passed to edit control in WM_SIZE message
# |
# | Modified files:
# | * dlls/user32/edit.c
# |
if test "$enable_user32_Edit_Control_Resize" -eq 1; then
patch_apply user32-Edit_Control_Resize/0001-user32-Ignore-sizes-passed-in-WM_SIZE-for-edit-contr.patch
(
echo '+ { "Michael Müller", "user32: Ignore sizes passed in WM_SIZE for edit control.", 1 },';
) >> "$patchlist"
fi
# Patchset user32-GetSystemMetrics
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,35 @@
From d6c4b5bde83cd1cf8a71084841342e27c94fd8ad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 27 Sep 2015 15:27:42 +0200
Subject: user32: Ignore sizes passed in WM_SIZE for edit control.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Michael Müller <michael@fds-team.de>
---
dlls/user32/edit.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/user32/edit.c b/dlls/user32/edit.c
index 084bbff..0f5d86d 100644
--- a/dlls/user32/edit.c
+++ b/dlls/user32/edit.c
@@ -3925,10 +3925,11 @@ static void EDIT_WM_SetText(EDITSTATE *es, LPCWSTR text, BOOL unicode)
*/
static void EDIT_WM_Size(EDITSTATE *es, UINT action, INT width, INT height)
{
- if ((action == SIZE_MAXIMIZED) || (action == SIZE_RESTORED)) {
+ if ((action == SIZE_MAXIMIZED) || (action == SIZE_RESTORED))
+ {
RECT rc;
- TRACE("width = %d, height = %d\n", width, height);
- SetRect(&rc, 0, 0, width, height);
+ /* Approach passes zero as width/height, so don't trust these values */
+ GetClientRect(es->hwndSelf, &rc);
EDIT_SetRectNP(es, &rc);
EDIT_UpdateText(es, NULL, TRUE);
}
--
2.5.1

View File

@ -0,0 +1 @@
Fixes: [37542] Do not trust width/height passed to edit control in WM_SIZE message