Added patch to fix leak and use-after-free in winecfg theming implementation.

This commit is contained in:
Sebastian Lackner
2015-08-08 01:09:04 +02:00
parent 45e6770be6
commit b23f8c789b
3 changed files with 56 additions and 12 deletions

View File

@@ -0,0 +1,26 @@
From 13a30e3966820c04e76e48182e7c2b9a979ecc17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 8 Aug 2015 00:52:36 +0200
Subject: winecfg: Do not overwrite theme each time an item is drawn.
Fixes a leak and a use-after-free.
---
programs/winecfg/theme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c
index 8bc3c88..1f4818b 100644
--- a/programs/winecfg/theme.c
+++ b/programs/winecfg/theme.c
@@ -1094,7 +1094,7 @@ static void on_draw_item(HWND hDlg, WPARAM wParam, LPARAM lParam)
HTHEME theme;
RECT buttonrect;
- theme = OpenThemeData(draw_info->hwndItem, WC_BUTTONW);
+ theme = OpenThemeData(NULL, WC_BUTTONW);
if (theme) {
MARGINS margins;
--
2.5.0