You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 330dc601978922aa1d5864d29d94882d6b1990d1.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 8c7a7c6ba3e1a7752bd0bb5d58e01cc7c3475c88 Mon Sep 17 00:00:00 2001
|
||||
From ef1c68c88caa4b4edfce72ad7fed38a4e23a56d1 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Fri, 18 Nov 2016 22:31:29 +0800
|
||||
Subject: [PATCH] uxtheme: Protect CloseThemeData() from invalid input.
|
||||
@@ -14,7 +14,7 @@ Testcase by Michael Müller <michael@fds-team.de>.
|
||||
3 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c
|
||||
index ed22d923250..21106a5f8e0 100644
|
||||
index 9e5a79a1c69..18c675214d9 100644
|
||||
--- a/dlls/uxtheme/msstyles.c
|
||||
+++ b/dlls/uxtheme/msstyles.c
|
||||
@@ -32,6 +32,7 @@
|
||||
@@ -25,7 +25,7 @@ index ed22d923250..21106a5f8e0 100644
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
@@ -48,6 +49,8 @@ static HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPC
|
||||
@@ -49,6 +50,8 @@ static HRESULT MSSTYLES_GetFont (LPCWSTR lpStringStart, LPCWSTR lpStringEnd, LPC
|
||||
|
||||
#define MSSTYLES_VERSION 0x0003
|
||||
|
||||
@@ -34,7 +34,7 @@ index ed22d923250..21106a5f8e0 100644
|
||||
static PTHEME_FILE tfActiveTheme;
|
||||
|
||||
/***********************************************************************/
|
||||
@@ -203,6 +206,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
|
||||
@@ -204,6 +207,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
|
||||
pcls->partstate = ps->next;
|
||||
heap_free(ps);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ index ed22d923250..21106a5f8e0 100644
|
||||
heap_free(pcls);
|
||||
}
|
||||
}
|
||||
@@ -431,6 +435,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
|
||||
@@ -442,6 +446,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
|
||||
if(cur) return cur;
|
||||
|
||||
cur = heap_alloc(sizeof(*cur));
|
||||
@@ -50,7 +50,7 @@ index ed22d923250..21106a5f8e0 100644
|
||||
cur->hTheme = tf->hTheme;
|
||||
lstrcpyW(cur->szAppName, pszAppName);
|
||||
lstrcpyW(cur->szClassName, pszClassName);
|
||||
@@ -1022,6 +1027,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
|
||||
@@ -1075,6 +1080,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList, U
|
||||
*/
|
||||
HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc)
|
||||
{
|
||||
@@ -75,7 +75,7 @@ index ed22d923250..21106a5f8e0 100644
|
||||
return S_OK;
|
||||
}
|
||||
diff --git a/dlls/uxtheme/msstyles.h b/dlls/uxtheme/msstyles.h
|
||||
index 0b7e1ab35cc..ba10ac82b82 100644
|
||||
index 67f81315d7a..9a65b7cb8a7 100644
|
||||
--- a/dlls/uxtheme/msstyles.h
|
||||
+++ b/dlls/uxtheme/msstyles.h
|
||||
@@ -49,6 +49,7 @@ typedef struct _THEME_PARTSTATE {
|
||||
@@ -86,7 +86,7 @@ index 0b7e1ab35cc..ba10ac82b82 100644
|
||||
HMODULE hTheme;
|
||||
struct _THEME_FILE* tf;
|
||||
WCHAR szAppName[MAX_THEME_APP_NAME];
|
||||
@@ -63,7 +64,7 @@ typedef struct _THEME_IMAGE {
|
||||
@@ -64,7 +65,7 @@ typedef struct _THEME_IMAGE {
|
||||
WCHAR name[MAX_PATH];
|
||||
HBITMAP image;
|
||||
BOOL hasAlpha;
|
||||
@@ -96,11 +96,11 @@ index 0b7e1ab35cc..ba10ac82b82 100644
|
||||
} THEME_IMAGE, *PTHEME_IMAGE;
|
||||
|
||||
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
|
||||
index 869dbe2cdc9..f5097012a2d 100644
|
||||
index 93b6f1aa8f7..2e3a323f96c 100644
|
||||
--- a/dlls/uxtheme/tests/system.c
|
||||
+++ b/dlls/uxtheme/tests/system.c
|
||||
@@ -195,6 +195,10 @@ static void test_OpenThemeData(void)
|
||||
ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08x, got 0x%08x\n",
|
||||
@@ -528,6 +528,10 @@ static void test_OpenThemeData(void)
|
||||
ok( GetLastError() == E_PROP_ID_UNSUPPORTED, "Expected 0x%08lx, got 0x%08lx\n",
|
||||
E_PROP_ID_UNSUPPORTED, GetLastError() );
|
||||
|
||||
+ /* Close invalid handle */
|
||||
@@ -111,5 +111,5 @@ index 869dbe2cdc9..f5097012a2d 100644
|
||||
{
|
||||
SetLastError(0xdeadbeef);
|
||||
--
|
||||
2.30.2
|
||||
2.35.1
|
||||
|
||||
|
Reference in New Issue
Block a user