Rebase against 887a57fadd00b39b266b421fe1a04ab09e0d917d

This commit is contained in:
Alistair Leslie-Hughes
2019-06-26 12:57:43 +10:00
parent be41345d31
commit fad0c725ae
11 changed files with 235 additions and 577 deletions

View File

@@ -1,4 +1,4 @@
From 54d8fb202add2fa8dc95fbdee431994886a84b90 Mon Sep 17 00:00:00 2001
From f97de7500c086aa283e4b299f3f103a83438fd01 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,18 +14,18 @@ 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 fe91494..7cd2145 100644
index cee5aaf054e..5030e52a597 100644
--- a/dlls/uxtheme/msstyles.c
+++ b/dlls/uxtheme/msstyles.c
@@ -35,6 +35,7 @@
@@ -32,6 +32,7 @@
#include "msstyles.h"
#include "wine/unicode.h"
+#include "wine/exception.h"
#include "wine/debug.h"
#include "wine/heap.h"
@@ -57,6 +58,8 @@ static const WCHAR szThemesIniResource[] = {
@@ -54,6 +55,8 @@ static const WCHAR szThemesIniResource[] = {
't','h','e','m','e','s','_','i','n','i','\0'
};
@@ -34,7 +34,7 @@ index fe91494..7cd2145 100644
static PTHEME_FILE tfActiveTheme;
/***********************************************************************/
@@ -221,6 +224,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
@@ -218,6 +221,7 @@ void MSSTYLES_CloseThemeFile(PTHEME_FILE tf)
pcls->partstate = ps->next;
heap_free(ps);
}
@@ -42,7 +42,7 @@ index fe91494..7cd2145 100644
heap_free(pcls);
}
}
@@ -452,6 +456,7 @@ static PTHEME_CLASS MSSTYLES_AddClass(PTHEME_FILE tf, LPCWSTR pszAppName, LPCWST
@@ -449,6 +453,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 fe91494..7cd2145 100644
cur->hTheme = tf->hTheme;
lstrcpyW(cur->szAppName, pszAppName);
lstrcpyW(cur->szClassName, pszClassName);
@@ -1045,6 +1050,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
@@ -1042,6 +1047,23 @@ PTHEME_CLASS MSSTYLES_OpenThemeClass(LPCWSTR pszAppName, LPCWSTR pszClassList)
*/
HRESULT MSSTYLES_CloseThemeClass(PTHEME_CLASS tc)
{
@@ -75,7 +75,7 @@ index fe91494..7cd2145 100644
return S_OK;
}
diff --git a/dlls/uxtheme/msstyles.h b/dlls/uxtheme/msstyles.h
index 0b7e1ab..ba10ac8 100644
index 0b7e1ab35cc..ba10ac82b82 100644
--- a/dlls/uxtheme/msstyles.h
+++ b/dlls/uxtheme/msstyles.h
@@ -49,6 +49,7 @@ typedef struct _THEME_PARTSTATE {
@@ -96,10 +96,10 @@ index 0b7e1ab..ba10ac8 100644
} THEME_IMAGE, *PTHEME_IMAGE;
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
index 6989f44..d529279 100644
index b3a861eaa6b..1cfafb30e2a 100644
--- a/dlls/uxtheme/tests/system.c
+++ b/dlls/uxtheme/tests/system.c
@@ -198,6 +198,10 @@ static void test_OpenThemeData(void)
@@ -189,6 +189,10 @@ static void test_OpenThemeData(void)
"Expected GLE() to be E_PROP_ID_UNSUPPORTED, got 0x%08x\n",
GetLastError());
@@ -111,5 +111,5 @@ index 6989f44..d529279 100644
{
SetLastError(0xdeadbeef);
--
2.7.4
2.20.1