diff --git a/README.md b/README.md index d9fb257b..5ad53ab8 100644 --- a/README.md +++ b/README.md @@ -39,11 +39,12 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [5]:** +**Bug fixes and features included in the next upcoming release [6]:** * Catch invalid memory accesses in imagehlp.CheckSumMappedFile * Fix implementation of ntdll.MapViewOfSection * Implement enumeration of sound devices and basic properties to dxdiagn ([Wine Bug #32613](https://bugs.winehq.org/show_bug.cgi?id=32613)) +* Implement special handling for calling GetChildContainer with an empty string ([Wine Bug #38014](https://bugs.winehq.org/show_bug.cgi?id=38014)) * Implement vcomp locking functions ([Wine Bug #26688](https://bugs.winehq.org/show_bug.cgi?id=26688)) * Properly implement imagehlp.ImageLoad and ImageUnload diff --git a/debian/changelog b/debian/changelog index 75da9419..63aa553d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ wine-staging (1.7.50) UNRELEASED; urgency=low * Added patch to fix implementation of ntdll.MapViewOfSection. * Added patch to implement enumeration of sound devices and basic properties to dxdiagn. + * Added patch to implement special handling for calling GetChildContainer with + an empty string. * Removed patch to move security cookie initialization from memory management to loader. -- Sebastian Lackner Tue, 11 Aug 2015 06:12:14 +0200 diff --git a/patches/dxdiagn-GetChildContainer_Leaf_Nodes/0001-dxdiagn-Calling-GetChildContainer-with-an-empty-stri.patch b/patches/dxdiagn-GetChildContainer_Leaf_Nodes/0001-dxdiagn-Calling-GetChildContainer-with-an-empty-stri.patch new file mode 100644 index 00000000..7ad37141 --- /dev/null +++ b/patches/dxdiagn-GetChildContainer_Leaf_Nodes/0001-dxdiagn-Calling-GetChildContainer-with-an-empty-stri.patch @@ -0,0 +1,122 @@ +From 0b45d42b25aecc86e19aba20d9114b4c76947c9c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Sat, 15 Aug 2015 03:58:04 +0200 +Subject: dxdiagn: Calling GetChildContainer with an empty string on a leaf + container returns the object itself + +--- + dlls/dxdiagn/container.c | 12 ++++++++++-- + dlls/dxdiagn/tests/container.c | 25 +++++++++++++++++++++++-- + 2 files changed, 33 insertions(+), 4 deletions(-) + +diff --git a/dlls/dxdiagn/container.c b/dlls/dxdiagn/container.c +index d167043..6e068e5 100644 +--- a/dlls/dxdiagn/container.c ++++ b/dlls/dxdiagn/container.c +@@ -162,6 +162,14 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i + if (NULL == tmp) return E_FAIL; + lstrcpynW(tmp, pwszContainer, tmp_len); + ++ /* special handling for an empty string and leaf container */ ++ if (!tmp[0] && list_empty(&pContainer->subContainers)) { ++ hr = DXDiag_CreateDXDiagContainer(&IID_IDxDiagContainer, pContainer, This->pProv, (void **)ppInstance); ++ if (SUCCEEDED(hr)) ++ TRACE("Succeeded in getting the container instance\n"); ++ goto out; ++ } ++ + cur = strchrW(tmp, '.'); + while (NULL != cur) { + *cur = '\0'; /* cut tmp string to '.' */ +@@ -169,7 +177,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i + TRACE("Trying to get parent container %s\n", debugstr_w(tmp)); + hr = IDxDiagContainerImpl_GetChildContainerInternal(pContainer, tmp, &pContainer); + if (FAILED(hr)) +- goto on_error; ++ goto out; + cur++; /* go after '.' (just replaced by \0) */ + tmp = cur; + cur = strchrW(tmp, '.'); +@@ -183,7 +191,7 @@ static HRESULT WINAPI IDxDiagContainerImpl_GetChildContainer(IDxDiagContainer *i + TRACE("Succeeded in getting the container instance\n"); + } + +-on_error: ++out: + HeapFree(GetProcessHeap(), 0, orig_tmp); + return hr; + } +diff --git a/dlls/dxdiagn/tests/container.c b/dlls/dxdiagn/tests/container.c +index 2ffe0fb..aab6122 100644 +--- a/dlls/dxdiagn/tests/container.c ++++ b/dlls/dxdiagn/tests/container.c +@@ -901,7 +901,8 @@ static void test_DxDiag_SystemInfo(void) + {szProcessorEnglish, VT_BSTR}, + }; + +- IDxDiagContainer *container; ++ IDxDiagContainer *container, *container2; ++ static const WCHAR empty[] = {0}; + HRESULT hr; + + if (!create_root_IDxDiagContainer()) +@@ -910,6 +911,9 @@ static void test_DxDiag_SystemInfo(void) + return; + } + ++ hr = IDxDiagContainer_GetChildContainer(pddc, empty, &container2); ++ ok(hr == E_INVALIDARG, "Expected IDxDiagContainer::GetChildContainer to return E_INVALIDARG, got 0x%08x\n", hr); ++ + hr = IDxDiagContainer_GetChildContainer(pddc, DxDiag_SystemInfo, &container); + ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); + +@@ -917,6 +921,14 @@ static void test_DxDiag_SystemInfo(void) + { + trace("Testing container DxDiag_SystemInfo\n"); + test_container_properties(container, property_tests, sizeof(property_tests)/sizeof(property_tests[0])); ++ ++ container2 = NULL; ++ hr = IDxDiagContainer_GetChildContainer(container, empty, &container2); ++ ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); ++ ok(container2 != NULL, "Expected container2 != NULL\n"); ++ ok(container2 != container, "Expected container != container2\n"); ++ if (hr == S_OK) IDxDiagContainer_Release(container2); ++ + IDxDiagContainer_Release(container); + } + +@@ -1031,6 +1043,7 @@ static void test_DxDiag_SoundDevices(void) + static const WCHAR szGuidDeviceID[] = {'s','z','G','u','i','d','D','e','v','i','c','e','I','D',0}; + static const WCHAR szDriverPath[] = {'s','z','D','r','i','v','e','r','P','a','t','h',0}; + static const WCHAR szDriverName[] = {'s','z','D','r','i','v','e','r','N','a','m','e',0}; ++ static const WCHAR empty[] = {0}; + + static const struct property_test property_tests[] = + { +@@ -1070,7 +1083,7 @@ static void test_DxDiag_SoundDevices(void) + for (i = 0; i < count; i++) + { + WCHAR child_container[256]; +- IDxDiagContainer *child; ++ IDxDiagContainer *child, *child2; + + hr = IDxDiagContainer_EnumChildContainerNames(sound_cont, i, child_container, sizeof(child_container)/sizeof(WCHAR)); + ok(hr == S_OK, "Expected IDxDiagContainer::EnumChildContainerNames to return S_OK, got 0x%08x\n", hr); +@@ -1083,6 +1096,14 @@ static void test_DxDiag_SoundDevices(void) + trace("Testing container %s\n", wine_dbgstr_w(child_container)); + test_container_properties(child, property_tests, sizeof(property_tests)/sizeof(property_tests[0])); + } ++ ++ child2 = NULL; ++ hr = IDxDiagContainer_GetChildContainer(child, empty, &child2); ++ ok(hr == S_OK, "Expected IDxDiagContainer::GetChildContainer to return S_OK, got 0x%08x\n", hr); ++ ok(child2 != NULL, "Expected child2 != NULL\n"); ++ ok(child2 != child, "Expected child != child2\n"); ++ if (hr == S_OK) IDxDiagContainer_Release(child2); ++ + IDxDiagContainer_Release(child); + } + +-- +2.5.0 + diff --git a/patches/dxdiagn-GetChildContainer_Leaf_Nodes/definition b/patches/dxdiagn-GetChildContainer_Leaf_Nodes/definition new file mode 100644 index 00000000..05862fb1 --- /dev/null +++ b/patches/dxdiagn-GetChildContainer_Leaf_Nodes/definition @@ -0,0 +1,2 @@ +Fixes: [38014] Implement special handling for calling GetChildContainer with an empty string +Depends: dxdiagn-Enumerate_DirectSound diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index e81d0525..87889f20 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -118,6 +118,7 @@ patch_enable_all () enable_dsound_EAX="$1" enable_dsound_Fast_Mixer="$1" enable_dxdiagn_Enumerate_DirectSound="$1" + enable_dxdiagn_GetChildContainer_Leaf_Nodes="$1" enable_dxgi_GetDesc="$1" enable_dxgi_MakeWindowAssociation="$1" enable_dxva2_Video_Decoder="$1" @@ -439,6 +440,9 @@ patch_enable () dxdiagn-Enumerate_DirectSound) enable_dxdiagn_Enumerate_DirectSound="$2" ;; + dxdiagn-GetChildContainer_Leaf_Nodes) + enable_dxdiagn_GetChildContainer_Leaf_Nodes="$2" + ;; dxgi-GetDesc) enable_dxgi_GetDesc="$2" ;; @@ -1814,6 +1818,13 @@ if test "$enable_dxva2_Video_Decoder" -eq 1; then enable_winecfg_Staging=1 fi +if test "$enable_dxdiagn_GetChildContainer_Leaf_Nodes" -eq 1; then + if test "$enable_dxdiagn_Enumerate_DirectSound" -gt 1; then + abort "Patchset dxdiagn-Enumerate_DirectSound disabled, but dxdiagn-GetChildContainer_Leaf_Nodes depends on that." + fi + enable_dxdiagn_Enumerate_DirectSound=1 +fi + if test "$enable_dsound_EAX" -eq 1; then if test "$enable_dsound_Fast_Mixer" -gt 1; then abort "Patchset dsound-Fast_Mixer disabled, but dsound-EAX depends on that." @@ -2776,6 +2787,24 @@ if test "$enable_dxdiagn_Enumerate_DirectSound" -eq 1; then ) >> "$patchlist" fi +# Patchset dxdiagn-GetChildContainer_Leaf_Nodes +# | +# | This patchset has the following dependencies: +# | * dxdiagn-Enumerate_DirectSound +# | +# | This patchset fixes the following Wine bugs: +# | * [#38014] Implement special handling for calling GetChildContainer with an empty string +# | +# | Modified files: +# | * dlls/dxdiagn/container.c, dlls/dxdiagn/tests/container.c +# | +if test "$enable_dxdiagn_GetChildContainer_Leaf_Nodes" -eq 1; then + patch_apply dxdiagn-GetChildContainer_Leaf_Nodes/0001-dxdiagn-Calling-GetChildContainer-with-an-empty-stri.patch + ( + echo '+ { "Michael Müller", "dxdiagn: Calling GetChildContainer with an empty string on a leaf container returns the object itself.", 1 },'; + ) >> "$patchlist" +fi + # Patchset dxgi-GetDesc # | # | This patchset fixes the following Wine bugs: