From 138070e1412d6592df45d27fcf1ab0d0c4dcdc2a Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 1 Sep 2015 22:28:54 +0200 Subject: [PATCH] Added patch to silence repeated crypt32.CryptUnprotectMemory FIXMEs. --- debian/changelog | 1 + ...CryptUnprotectMemory-FIXME-only-once.patch | 25 +++++++++++++++++++ patches/patchinstall.sh | 16 ++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 patches/crypt32-CryptUnprotectMemory/0001-crypt32-Print-CryptUnprotectMemory-FIXME-only-once.patch diff --git a/debian/changelog b/debian/changelog index 13371c7d..7c91845d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ wine-staging (1.7.51) UNRELEASED; urgency=low * Added patch to translate flags in LaunchINFSectionW. * Added patch to fix SHFileOperation with FO_MOVE on Vista+ (should create non-existent subdirectories). + * Added patch to silence repeated crypt32.CryptUnprotectMemory FIXMEs. * Removed patch to fix bug in wineserver debug_children inheritance (accepted upstream). * Removed patch to use helper function for NtWaitForMultipleObjects and diff --git a/patches/crypt32-CryptUnprotectMemory/0001-crypt32-Print-CryptUnprotectMemory-FIXME-only-once.patch b/patches/crypt32-CryptUnprotectMemory/0001-crypt32-Print-CryptUnprotectMemory-FIXME-only-once.patch new file mode 100644 index 00000000..80977d7a --- /dev/null +++ b/patches/crypt32-CryptUnprotectMemory/0001-crypt32-Print-CryptUnprotectMemory-FIXME-only-once.patch @@ -0,0 +1,25 @@ +From 29ac40e7943195bda7acbc0ffa5cc966d8c1a40a Mon Sep 17 00:00:00 2001 +From: Christian Costa +Date: Mon, 31 Aug 2015 22:54:59 -0300 +Subject: crypt32: Print CryptUnprotectMemory FIXME only once. + +--- + dlls/crypt32/main.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dlls/crypt32/main.c b/dlls/crypt32/main.c +index 241a1d9..696195a 100644 +--- a/dlls/crypt32/main.c ++++ b/dlls/crypt32/main.c +@@ -259,6 +259,7 @@ BOOL WINAPI CryptProtectMemory(void *data, DWORD len, DWORD flags) + + BOOL WINAPI CryptUnprotectMemory(void *data, DWORD len, DWORD flags) + { +- FIXME("(%p %u %08x): stub\n", data, len, flags); ++ static int fixme_once; ++ if (!fixme_once++) FIXME("(%p %u %08x): stub\n", data, len, flags); + return TRUE; + } +-- +2.5.0 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index b15937a8..9121605f 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -95,6 +95,7 @@ patch_enable_all () enable_comctl32_LoadIconMetric="$1" enable_configure_Absolute_RPATH="$1" enable_crypt32_CMS_Certificates="$1" + enable_crypt32_CryptUnprotectMemory="$1" enable_d3d9_DesktopWindow="$1" enable_d3d9_Skip_Tests="$1" enable_d3d9_Surface_Refcount="$1" @@ -369,6 +370,9 @@ patch_enable () crypt32-CMS_Certificates) enable_crypt32_CMS_Certificates="$2" ;; + crypt32-CryptUnprotectMemory) + enable_crypt32_CryptUnprotectMemory="$2" + ;; d3d9-DesktopWindow) enable_d3d9_DesktopWindow="$2" ;; @@ -2291,6 +2295,18 @@ if test "$enable_crypt32_CMS_Certificates" -eq 1; then ) >> "$patchlist" fi +# Patchset crypt32-CryptUnprotectMemory +# | +# | Modified files: +# | * dlls/crypt32/main.c +# | +if test "$enable_crypt32_CryptUnprotectMemory" -eq 1; then + patch_apply crypt32-CryptUnprotectMemory/0001-crypt32-Print-CryptUnprotectMemory-FIXME-only-once.patch + ( + echo '+ { "Christian Costa", "crypt32: Print CryptUnprotectMemory FIXME only once.", 1 },'; + ) >> "$patchlist" +fi + # Patchset d3d9-DesktopWindow # | # | Modified files: