From f6e27c19e1e0100f5b4ccce44753cbecfbd03fba Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 5 Nov 2015 02:11:17 +0100 Subject: [PATCH] Rebase against 60fedd23f95c66f4dce06c5c447de9ec99ebefa5. --- README.md | 2 +- debian/changelog | 2 + ...-TVM_GETITEM-from-invalid-item-point.patch | 71 ------------------- patches/comctl32-TVM_GETITEM/definition | 1 - patches/patchinstall.sh | 21 +----- 5 files changed, 4 insertions(+), 93 deletions(-) delete mode 100644 patches/comctl32-TVM_GETITEM/0001-comctl32-Protect-TVM_GETITEM-from-invalid-item-point.patch delete mode 100644 patches/comctl32-TVM_GETITEM/definition diff --git a/README.md b/README.md index 5122d8c3..f2505feb 100644 --- a/README.md +++ b/README.md @@ -238,7 +238,7 @@ for more details.* * Properly implement imagehlp.ImageLoad and ImageUnload ([Wine Bug #23455](https://bugs.winehq.org/show_bug.cgi?id=23455)) * Properly initialize caps->dwZBufferBitDepths in ddraw7_GetCaps ([Wine Bug #27002](https://bugs.winehq.org/show_bug.cgi?id=27002)) * Properly render themed buttons when they are pressed ([Wine Bug #37584](https://bugs.winehq.org/show_bug.cgi?id=37584)) -* Protect TVM_GETITEM from invalid item pointers ([Wine Bug #33001](https://bugs.winehq.org/show_bug.cgi?id=33001)) +* ~~Protect TVM_GETITEM from invalid item pointers~~ ([Wine Bug #33001](https://bugs.winehq.org/show_bug.cgi?id=33001)) * Reduced SetTimer minimum value from 10 ms to 5 ms (improves Silverlight framerates) * Refresh MDI menus when DefMDIChildProc(WM_SETTEXT) is called ([Wine Bug #21855](https://bugs.winehq.org/show_bug.cgi?id=21855)) * Report correct ObjectName for NamedPipe wineserver objects diff --git a/debian/changelog b/debian/changelog index 17746c25..8844780d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ wine-staging (1.7.55) UNRELEASED; urgency=low * Removed patch for SfcGetNextProtectedFile stub function (accepted upstream). * Removed patch for SetConsoleKeyShortcuts stub function (accepted upstream). * Removed various PulseAudio driver patches (accepted upstream). + * Removed patch to protect TVM_GETITEM from invalid item pointers (accepted + upstream). -- Sebastian Lackner Sun, 01 Nov 2015 01:06:20 +0100 wine-staging (1.7.54) unstable; urgency=low diff --git a/patches/comctl32-TVM_GETITEM/0001-comctl32-Protect-TVM_GETITEM-from-invalid-item-point.patch b/patches/comctl32-TVM_GETITEM/0001-comctl32-Protect-TVM_GETITEM-from-invalid-item-point.patch deleted file mode 100644 index 4a063fb5..00000000 --- a/patches/comctl32-TVM_GETITEM/0001-comctl32-Protect-TVM_GETITEM-from-invalid-item-point.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 1b058c627bdd31c151110e8f554ab6210248e105 Mon Sep 17 00:00:00 2001 -From: Nikolay Sivov -Date: Fri, 22 Feb 2013 11:38:12 +0400 -Subject: comctl32: Protect TVM_GETITEM from invalid item pointers - -Changes by Sebastian Lackner : -* Avoid return in __TRY block. ---- - dlls/comctl32/tests/treeview.c | 9 +++++++++ - dlls/comctl32/treeview.c | 16 +++++++++++++--- - 2 files changed, 22 insertions(+), 3 deletions(-) - -diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c -index 5003dfa..933a8b0 100644 ---- a/dlls/comctl32/tests/treeview.c -+++ b/dlls/comctl32/tests/treeview.c -@@ -905,6 +905,15 @@ static void test_get_set_item(void) - expect(TRUE, ret); - ok(tviRoot.state == TVIS_FOCUSED, "got state 0x%0x\n", tviRoot.state); - -+if (0) -+{ -+ /* invalid item pointer, nt4 crashes here but later versions just return 0 */ -+ tviRoot.hItem = (HTREEITEM)0xdeadbeef; -+ tviRoot.mask = TVIF_STATE; -+ tviRoot.state = 0; -+ ret = SendMessageA(hTree2, TVM_GETITEMA, 0, (LPARAM)&tviRoot); -+ expect(FALSE, ret); -+} - DestroyWindow(hTree); - DestroyWindow(hTree2); - } -diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c -index 812bd35..6adafc4 100644 ---- a/dlls/comctl32/treeview.c -+++ b/dlls/comctl32/treeview.c -@@ -63,6 +63,7 @@ - #include "vssym32.h" - #include "wine/unicode.h" - #include "wine/debug.h" -+#include "wine/exception.h" - - WINE_DEFAULT_DEBUG_CHANNEL(treeview); - -@@ -2068,11 +2069,20 @@ TREEVIEW_GetItemT(const TREEVIEW_INFO *infoPtr, LPTVITEMEXW tvItem, BOOL isW) - - if (!TREEVIEW_ValidItem(infoPtr, item)) - { -+ BOOL valid_item = FALSE; - if (!item) return FALSE; - -- TRACE("got item from different tree %p, called from %p\n", item->infoPtr, infoPtr); -- infoPtr = item->infoPtr; -- if (!TREEVIEW_ValidItem(infoPtr, item)) return FALSE; -+ __TRY -+ { -+ infoPtr = item->infoPtr; -+ TRACE("got item from different tree %p, called from %p\n", item->infoPtr, infoPtr); -+ valid_item = TREEVIEW_ValidItem(infoPtr, item); -+ } -+ __EXCEPT_PAGE_FAULT -+ { -+ } -+ __ENDTRY -+ if (!valid_item) return FALSE; - } - - TREEVIEW_UpdateDispInfo(infoPtr, item, tvItem->mask); --- -2.5.1 - diff --git a/patches/comctl32-TVM_GETITEM/definition b/patches/comctl32-TVM_GETITEM/definition deleted file mode 100644 index 104cc358..00000000 --- a/patches/comctl32-TVM_GETITEM/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [33001] Protect TVM_GETITEM from invalid item pointers diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 6966c493..dbecdddc 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "a410990f7cb0fd7477d4594f8644428ca8873f0e" + echo "60fedd23f95c66f4dce06c5c447de9ec99ebefa5" } # Show version information @@ -94,7 +94,6 @@ patch_enable_all () enable_browseui_Progress_Dialog="$1" enable_comctl32_Button_Theming="$1" enable_comctl32_PROPSHEET_InsertPage="$1" - enable_comctl32_TVM_GETITEM="$1" enable_configure_Absolute_RPATH="$1" enable_crypt32_CMS_Certificates="$1" enable_crypt32_CryptUnprotectMemory="$1" @@ -382,9 +381,6 @@ patch_enable () comctl32-PROPSHEET_InsertPage) enable_comctl32_PROPSHEET_InsertPage="$2" ;; - comctl32-TVM_GETITEM) - enable_comctl32_TVM_GETITEM="$2" - ;; configure-Absolute_RPATH) enable_configure_Absolute_RPATH="$2" ;; @@ -2329,21 +2325,6 @@ if test "$enable_comctl32_PROPSHEET_InsertPage" -eq 1; then ) >> "$patchlist" fi -# Patchset comctl32-TVM_GETITEM -# | -# | This patchset fixes the following Wine bugs: -# | * [#33001] Protect TVM_GETITEM from invalid item pointers -# | -# | Modified files: -# | * dlls/comctl32/tests/treeview.c, dlls/comctl32/treeview.c -# | -if test "$enable_comctl32_TVM_GETITEM" -eq 1; then - patch_apply comctl32-TVM_GETITEM/0001-comctl32-Protect-TVM_GETITEM-from-invalid-item-point.patch - ( - echo '+ { "Nikolay Sivov", "comctl32: Protect TVM_GETITEM from invalid item pointers.", 1 },'; - ) >> "$patchlist" -fi - # Patchset configure-Absolute_RPATH # | # | This patchset fixes the following Wine bugs: