mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch to avoid crash when INVALID_HANDLE_VALUE is passed to CloseThemeData.
This commit is contained in:
parent
5e0122ae53
commit
c344dcf96e
@ -312,6 +312,7 @@ patch_enable_all ()
|
||||
enable_user32_WM_CAPTURECHANGE="$1"
|
||||
enable_user32_WM_MDICALCCHILDSCROLL="$1"
|
||||
enable_user32_WndProc="$1"
|
||||
enable_uxtheme_CloseThemeData="$1"
|
||||
enable_uxtheme_GTK_Theming="$1"
|
||||
enable_vcomp_Atomic_I8="$1"
|
||||
enable_version_VerQueryValue="$1"
|
||||
@ -1076,6 +1077,9 @@ patch_enable ()
|
||||
user32-WndProc)
|
||||
enable_user32_WndProc="$2"
|
||||
;;
|
||||
uxtheme-CloseThemeData)
|
||||
enable_uxtheme_CloseThemeData="$2"
|
||||
;;
|
||||
uxtheme-GTK_Theming)
|
||||
enable_uxtheme_GTK_Theming="$2"
|
||||
;;
|
||||
@ -6316,6 +6320,21 @@ if test "$enable_user32_WndProc" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset uxtheme-CloseThemeData
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#29862] Do not crash when INVALID_HANDLE_VALUE is passed to CloseThemeData
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/uxtheme/system.c, dlls/uxtheme/tests/system.c
|
||||
# |
|
||||
if test "$enable_uxtheme_CloseThemeData" -eq 1; then
|
||||
patch_apply uxtheme-CloseThemeData/0001-uxtheme-Do-not-crash-when-INVALID_HANDLE_VALUE-is-pa.patch
|
||||
(
|
||||
echo '+ { "Louis Lenders", "uxtheme: Do not crash when INVALID_HANDLE_VALUE is passed to CloseThemeData.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset uxtheme-GTK_Theming
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
|
@ -0,0 +1,40 @@
|
||||
From ab3d3417ca146b9a72b395b082b4aae628c39d7c Mon Sep 17 00:00:00 2001
|
||||
From: Louis Lenders <xerox_xerox2000@yahoo.co.uk>
|
||||
Date: Wed, 27 Jan 2016 07:29:50 +0100
|
||||
Subject: uxtheme: Do not crash when INVALID_HANDLE_VALUE is passed to
|
||||
CloseThemeData.
|
||||
|
||||
---
|
||||
dlls/uxtheme/system.c | 2 +-
|
||||
dlls/uxtheme/tests/system.c | 2 ++
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c
|
||||
index 8947587..7d07680 100644
|
||||
--- a/dlls/uxtheme/system.c
|
||||
+++ b/dlls/uxtheme/system.c
|
||||
@@ -746,7 +746,7 @@ void WINAPI SetThemeAppProperties(DWORD dwFlags)
|
||||
HRESULT WINAPI CloseThemeData(HTHEME hTheme)
|
||||
{
|
||||
TRACE("(%p)\n", hTheme);
|
||||
- if(!hTheme)
|
||||
+ if(!hTheme || hTheme == INVALID_HANDLE_VALUE)
|
||||
return E_HANDLE;
|
||||
return MSSTYLES_CloseThemeClass(hTheme);
|
||||
}
|
||||
diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c
|
||||
index 49eba64..4aeedbc 100644
|
||||
--- a/dlls/uxtheme/tests/system.c
|
||||
+++ b/dlls/uxtheme/tests/system.c
|
||||
@@ -541,6 +541,8 @@ static void test_CloseThemeData(void)
|
||||
|
||||
hRes = pCloseThemeData(NULL);
|
||||
ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes);
|
||||
+ hRes = pCloseThemeData(INVALID_HANDLE_VALUE);
|
||||
+ ok( hRes == E_HANDLE, "Expected E_HANDLE, got 0x%08x\n", hRes);
|
||||
}
|
||||
|
||||
START_TEST(system)
|
||||
--
|
||||
2.6.4
|
||||
|
1
patches/uxtheme-CloseThemeData/definition
Normal file
1
patches/uxtheme-CloseThemeData/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [29862] Do not crash when INVALID_HANDLE_VALUE is passed to CloseThemeData
|
Loading…
Reference in New Issue
Block a user