diff --git a/patches/ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch b/patches/ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch index d76b6cba..63d4a62a 100644 --- a/patches/ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch +++ b/patches/ntdll-Exception/0002-ntdll-OutputDebugString-should-throw-the-exception-a.patch @@ -1,4 +1,4 @@ -From 1889b85c9e9eecdff6882fc9a3d1f1b7247bd08a Mon Sep 17 00:00:00 2001 +From 5345a66f9403133fc7cdd9ec8273c7bb3d19020d Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 28 Sep 2014 23:39:51 +0200 Subject: [PATCH] ntdll: OutputDebugString should throw the exception a second @@ -10,7 +10,7 @@ Subject: [PATCH] ntdll: OutputDebugString should throw the exception a second 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/dlls/kernelbase/debug.c b/dlls/kernelbase/debug.c -index 20dd7d304a2..3b39f78cc7a 100644 +index 6acdf0f1ea9..edb95eace3f 100644 --- a/dlls/kernelbase/debug.c +++ b/dlls/kernelbase/debug.c @@ -213,6 +213,23 @@ void WINAPI DECLSPEC_HOTPATCH OutputDebugStringA( LPCSTR str ) @@ -38,10 +38,10 @@ index 20dd7d304a2..3b39f78cc7a 100644 if (!mutex_inited) { diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c -index 3ced3d04b71..9a2ab8db02a 100644 +index 7ee191469ec..561ccf966d9 100644 --- a/dlls/ntdll/tests/exception.c +++ b/dlls/ntdll/tests/exception.c -@@ -3893,7 +3893,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce +@@ -4532,7 +4532,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce return EXCEPTION_CONTINUE_SEARCH; } @@ -50,7 +50,7 @@ index 3ced3d04b71..9a2ab8db02a 100644 { PVOID vectored_handler; -@@ -3909,7 +3909,6 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo) +@@ -4548,7 +4548,6 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo) outputdebugstring_exceptions = 0; OutputDebugStringA("Hello World"); @@ -58,21 +58,21 @@ index 3ced3d04b71..9a2ab8db02a 100644 ok(outputdebugstring_exceptions == numexc, "OutputDebugStringA generated %d exceptions, expected %d\n", outputdebugstring_exceptions, numexc); -@@ -4509,9 +4508,9 @@ START_TEST(exception) - run_rtlraiseexception_test(EXCEPTION_BREAKPOINT); - run_rtlraiseexception_test(EXCEPTION_INVALID_HANDLE); - test_stage = 3; -- test_outputdebugstring(0, FALSE); -+ test_outputdebugstring(0); - test_stage = 4; -- test_outputdebugstring(2, TRUE); /* is this a Windows bug? */ -+ test_outputdebugstring(2); - test_stage = 5; - test_ripevent(0); - test_stage = 6; -@@ -4588,7 +4587,7 @@ START_TEST(exception) +@@ -5148,9 +5147,9 @@ START_TEST(exception) + else skip( "RtlRaiseException not found\n" ); #endif + test_stage = 3; +- test_outputdebugstring(0, FALSE); ++ test_outputdebugstring(0); + test_stage = 4; +- test_outputdebugstring(2, TRUE); /* is this a Windows bug? */ ++ test_outputdebugstring(2); + test_stage = 5; + test_ripevent(0); + test_stage = 6; +@@ -5226,7 +5225,7 @@ START_TEST(exception) + test_debugger(); test_thread_context(); - test_outputdebugstring(1, FALSE); + test_outputdebugstring(1); diff --git a/patches/ole32-HGLOBALStream/0001-ole32-tests-Add-a-bunch-of-tests-for-HGLOBAL-based-I.patch b/patches/ole32-HGLOBALStream/0001-ole32-tests-Add-a-bunch-of-tests-for-HGLOBAL-based-I.patch deleted file mode 100644 index a8486600..00000000 --- a/patches/ole32-HGLOBALStream/0001-ole32-tests-Add-a-bunch-of-tests-for-HGLOBAL-based-I.patch +++ /dev/null @@ -1,277 +0,0 @@ -From ecbbd1eba3491e634bb138044bb8e283be7bba28 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Tue, 2 Feb 2016 12:49:16 +0800 -Subject: [PATCH 1/7] ole32/tests: Add a bunch of tests for HGLOBAL based - IStream::Clone. - ---- - dlls/ole32/tests/hglobalstream.c | 243 +++++++++++++++++++++++++++++++++++++++ - 1 file changed, 243 insertions(+) - -diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c -index 6a0498a..d8b8081 100644 ---- a/dlls/ole32/tests/hglobalstream.c -+++ b/dlls/ole32/tests/hglobalstream.c -@@ -2,6 +2,7 @@ - * Stream on HGLOBAL Tests - * - * Copyright 2006 Robert Shearman (for CodeWeavers) -+ * Copyright 2016 Dmitry Timoshkov - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public -@@ -514,9 +515,251 @@ static void test_freed_hglobal(void) - IStream_Release(pStream); - } - -+static void stream_info(IStream *stream, HGLOBAL *hmem, int *size, int *pos) -+{ -+ HRESULT hr; -+ STATSTG stat; -+ LARGE_INTEGER offset; -+ ULARGE_INTEGER newpos; -+ -+ *hmem = 0; -+ *size = *pos = -1; -+ -+ hr = GetHGlobalFromStream(stream, hmem); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ memset(&stat, 0x55, sizeof(stat)); -+ hr = IStream_Stat(stream, &stat, STATFLAG_DEFAULT); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ ok(stat.type == STGTY_STREAM, "unexpected %#x\n", stat.type); -+ ok(!stat.pwcsName, "unexpected %p\n", stat.pwcsName); -+ ok(IsEqualIID(&stat.clsid, &GUID_NULL), "unexpected %s\n", wine_dbgstr_guid(&stat.clsid)); -+ ok(!stat.cbSize.HighPart, "unexpected %#x\n", stat.cbSize.HighPart); -+ *size = stat.cbSize.LowPart; -+ -+ offset.QuadPart = 0; -+ hr = IStream_Seek(stream, offset, STREAM_SEEK_CUR, &newpos); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ ok(!newpos.HighPart, "unexpected %#x\n", newpos.HighPart); -+ *pos = newpos.LowPart; -+} -+ -+static void test_IStream_Clone(void) -+{ -+ static const char hello[] = "Hello World!"; -+ char buf[32]; -+ HRESULT hr; -+ IStream *stream, *clone; -+ HGLOBAL orig_hmem, hmem, hmem_clone; -+ ULARGE_INTEGER newsize; -+ LARGE_INTEGER offset; -+ int size, pos, ret; -+ -+ /* test simple case for Clone */ -+ orig_hmem = GlobalAlloc(GMEM_MOVEABLE, 0); -+ ok(orig_hmem != 0, "unexpected %p\n", orig_hmem); -+ hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &stream); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(stream, &hmem, &size, &pos); -+ ok(hmem == orig_hmem, "handles should match\n"); -+ ok(size == 0, "unexpected %d\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ hr = IStream_Clone(stream, &clone); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ hr = IStream_Write(stream, hello, sizeof(hello), NULL); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(stream, &hmem, &size, &pos); -+ ok(hmem != 0, "unexpected %p\n", hmem); -+ ok(size == 13, "unexpected %d\n", size); -+ ok(pos == 13, "unexpected %d\n", pos); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+todo_wine -+ ok(size == 13, "unexpected %d\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ buf[0] = 0; -+ hr = IStream_Read(clone, buf, sizeof(buf), NULL); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+todo_wine -+ ok(!strcmp(buf, hello), "wrong stream contents\n"); -+ -+ newsize.QuadPart = 0x8000; -+ hr = IStream_SetSize(stream, newsize); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(stream, &hmem, &size, &pos); -+ ok(hmem != 0, "unexpected %p\n", hmem); -+ ok(hmem == orig_hmem, "unexpected %p\n", hmem); -+ ok(size == 0x8000, "unexpected %#x\n", size); -+ ok(pos == 13, "unexpected %d\n", pos); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+todo_wine -+ ok(size == 0x8000, "unexpected %#x\n", size); -+todo_wine -+ ok(pos == 13, "unexpected %d\n", pos); -+ -+ IStream_Release(clone); -+ IStream_Release(stream); -+ -+ /* exploit GMEM_FIXED forced move for the same base streams */ -+ orig_hmem = GlobalAlloc(GMEM_FIXED, 1); -+ ok(orig_hmem != 0, "unexpected %p\n", orig_hmem); -+ hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &stream); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ hr = IStream_Clone(stream, &clone); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(stream, &hmem, &size, &pos); -+ ok(hmem != 0, "unexpected %p\n", hmem); -+ ok(size == 1, "unexpected %d\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+ ok(size == 1, "unexpected %d\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ newsize.QuadPart = 0x8000; -+ hr = IStream_SetSize(stream, newsize); -+todo_wine -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(stream, &hmem, &size, &pos); -+ ok(hmem != 0, "unexpected %p\n", hmem); -+todo_wine -+ ok(hmem != orig_hmem, "unexpected %p\n", hmem); -+todo_wine -+ ok(size == 0x8000, "unexpected %#x\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+todo_wine -+ ok(size == 0x8000, "unexpected %#x\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ IStream_Release(stream); -+ IStream_Release(clone); -+ -+ /* exploit GMEM_FIXED forced move for different base streams */ -+ orig_hmem = GlobalAlloc(GMEM_FIXED, 1); -+ ok(orig_hmem != 0, "unexpected %p\n", orig_hmem); -+ hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &stream); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ hr = CreateStreamOnHGlobal(orig_hmem, TRUE, &clone); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(stream, &hmem, &size, &pos); -+ ok(hmem != 0, "unexpected %p\n", hmem); -+ ok(size == 1, "unexpected %d\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+ ok(size == 1, "unexpected %d\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ newsize.QuadPart = 0x8000; -+ hr = IStream_SetSize(stream, newsize); -+todo_wine -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(stream, &hmem, &size, &pos); -+ ok(hmem != 0, "unexpected %p\n", hmem); -+todo_wine -+ ok(hmem != orig_hmem, "unexpected %p\n", hmem); -+todo_wine -+ ok(size == 0x8000, "unexpected %#x\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+todo_wine -+ ok(hmem_clone != hmem, "handles should not match\n"); -+ ok(size == 1, "unexpected %#x\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ IStream_Release(stream); -+ /* releasing clone leads to test termination under windows -+ IStream_Release(clone); -+ */ -+ -+ /* test Release for a being cloned stream */ -+ hr = CreateStreamOnHGlobal(0, TRUE, &stream); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ hr = IStream_Clone(stream, &clone); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(stream, &hmem, &size, &pos); -+ ok(hmem != 0, "unexpected %p\n", hmem); -+ ok(size == 0, "unexpected %d\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+ ok(size == 0, "unexpected %#x\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ ret = IStream_Release(stream); -+ ok(ret == 0, "unexpected %d\n", ret); -+ -+ newsize.QuadPart = 0x8000; -+ hr = IStream_SetSize(clone, newsize); -+todo_wine -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+todo_wine -+ ok(size == 0x8000, "unexpected %#x\n", size); -+ ok(pos == 0, "unexpected %d\n", pos); -+ -+ hr = IStream_Write(clone, hello, sizeof(hello), NULL); -+todo_wine -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+todo_wine -+ ok(size == 0x8000, "unexpected %#x\n", size); -+todo_wine -+ ok(pos == 13, "unexpected %d\n", pos); -+ -+ offset.QuadPart = 0; -+ hr = IStream_Seek(clone, offset, STREAM_SEEK_SET, NULL); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+ -+ buf[0] = 0; -+ hr = IStream_Read(clone, buf, sizeof(buf), NULL); -+ ok(hr == S_OK, "unexpected %#x\n", hr); -+todo_wine -+ ok(!strcmp(buf, hello), "wrong stream contents\n"); -+ -+ stream_info(clone, &hmem_clone, &size, &pos); -+ ok(hmem_clone == hmem, "handles should match\n"); -+todo_wine -+ ok(size == 0x8000, "unexpected %#x\n", size); -+todo_wine -+ ok(pos == 32, "unexpected %d\n", pos); -+ -+ ret = IStream_Release(clone); -+ ok(ret == 0, "unexpected %d\n", ret); -+} -+ - START_TEST(hglobalstream) - { - test_streamonhglobal(); - test_copyto(); - test_freed_hglobal(); -+ test_IStream_Clone(); - } --- -2.7.4 - diff --git a/patches/ole32-HGLOBALStream/0005-ole32-Allow-moving-a-being-reallocated-block-of-memo.patch b/patches/ole32-HGLOBALStream/0005-ole32-Allow-moving-a-being-reallocated-block-of-memo.patch deleted file mode 100644 index 301f2664..00000000 --- a/patches/ole32-HGLOBALStream/0005-ole32-Allow-moving-a-being-reallocated-block-of-memo.patch +++ /dev/null @@ -1,72 +0,0 @@ -From b7849b3a81d2e55ccfc3d61a8a14bbacf878438b Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Tue, 2 Feb 2016 15:35:59 +0800 -Subject: ole32: Allow moving a being reallocated block of memory managed by - HGLOBAL based IStream. - ---- - dlls/ole32/hglobalstream.c | 2 +- - dlls/ole32/tests/hglobalstream.c | 8 -------- - 2 files changed, 1 insertion(+), 9 deletions(-) - -diff --git a/dlls/ole32/hglobalstream.c b/dlls/ole32/hglobalstream.c -index 8b7e960..3e7f67b 100644 ---- a/dlls/ole32/hglobalstream.c -+++ b/dlls/ole32/hglobalstream.c -@@ -100,7 +100,7 @@ static HRESULT handle_setsize(struct handle_wrapper *handle, ULONG size) - - if (handle->size != size) - { -- HGLOBAL hglobal = GlobalReAlloc(handle->hglobal, size, 0); -+ HGLOBAL hglobal = GlobalReAlloc(handle->hglobal, size, GMEM_MOVEABLE); - if (hglobal) - { - handle->hglobal = hglobal; -diff --git a/dlls/ole32/tests/hglobalstream.c b/dlls/ole32/tests/hglobalstream.c -index afda4e6..9aa3b6c 100644 ---- a/dlls/ole32/tests/hglobalstream.c -+++ b/dlls/ole32/tests/hglobalstream.c -@@ -626,20 +626,16 @@ static void test_IStream_Clone(void) - - newsize.QuadPart = 0x8000; - hr = IStream_SetSize(stream, newsize); --todo_wine - ok(hr == S_OK, "unexpected %#x\n", hr); - - stream_info(stream, &hmem, &size, &pos); - ok(hmem != 0, "unexpected %p\n", hmem); --todo_wine - ok(hmem != orig_hmem, "unexpected %p\n", hmem); --todo_wine - ok(size == 0x8000, "unexpected %#x\n", size); - ok(pos == 0, "unexpected %d\n", pos); - - stream_info(clone, &hmem_clone, &size, &pos); - ok(hmem_clone == hmem, "handles should match\n"); --todo_wine - ok(size == 0x8000, "unexpected %#x\n", size); - ok(pos == 0, "unexpected %d\n", pos); - -@@ -667,19 +663,15 @@ todo_wine - - newsize.QuadPart = 0x8000; - hr = IStream_SetSize(stream, newsize); --todo_wine - ok(hr == S_OK, "unexpected %#x\n", hr); - - stream_info(stream, &hmem, &size, &pos); - ok(hmem != 0, "unexpected %p\n", hmem); --todo_wine - ok(hmem != orig_hmem, "unexpected %p\n", hmem); --todo_wine - ok(size == 0x8000, "unexpected %#x\n", size); - ok(pos == 0, "unexpected %d\n", pos); - - stream_info(clone, &hmem_clone, &size, &pos); --todo_wine - ok(hmem_clone != hmem, "handles should not match\n"); - ok(size == 1, "unexpected %#x\n", size); - ok(pos == 0, "unexpected %d\n", pos); --- -2.7.0 - diff --git a/patches/ole32-HGLOBALStream/definition b/patches/ole32-HGLOBALStream/definition index 4968e736..9d214187 100644 --- a/patches/ole32-HGLOBALStream/definition +++ b/patches/ole32-HGLOBALStream/definition @@ -1 +1,2 @@ Fixes: [41738] Implement proper refcounting and locking for HGLOBAL based IStream +Disabled: true \ No newline at end of file diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index def601b5..5b4b09be 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "1ec8bf9b739f1528b742169670eac2350b33a7d4" + echo "03e9de4920173d3fa955cf28a8d2b60bd3b06261" } # Show version information @@ -205,7 +205,6 @@ patch_enable_all () enable_nvcuda_CUDA_Support="$1" enable_nvcuvid_CUDA_Video_Support="$1" enable_nvencodeapi_Video_Encoder="$1" - enable_ole32_HGLOBALStream="$1" enable_oleaut32_CreateTypeLib="$1" enable_oleaut32_Load_Save_EMF="$1" enable_oleaut32_OLEPictureImpl_SaveAsFile="$1" @@ -706,9 +705,6 @@ patch_enable () nvencodeapi-Video_Encoder) enable_nvencodeapi_Video_Encoder="$2" ;; - ole32-HGLOBALStream) - enable_ole32_HGLOBALStream="$2" - ;; oleaut32-CreateTypeLib) enable_oleaut32_CreateTypeLib="$2" ;; @@ -4196,33 +4192,6 @@ if test "$enable_nvencodeapi_Video_Encoder" -eq 1; then ) >> "$patchlist" fi -# Patchset ole32-HGLOBALStream -# | -# | This patchset fixes the following Wine bugs: -# | * [#41738] Implement proper refcounting and locking for HGLOBAL based IStream -# | -# | Modified files: -# | * dlls/ole32/hglobalstream.c, dlls/ole32/tests/hglobalstream.c -# | -if test "$enable_ole32_HGLOBALStream" -eq 1; then - patch_apply ole32-HGLOBALStream/0001-ole32-tests-Add-a-bunch-of-tests-for-HGLOBAL-based-I.patch - patch_apply ole32-HGLOBALStream/0002-ole32-Add-a-check-for-hglobal-pointer-to-GetHGlobalF.patch - patch_apply ole32-HGLOBALStream/0003-ole32-Add-a-wrapper-for-memory-block-managed-by-HGLO.patch - patch_apply ole32-HGLOBALStream/0004-ole32-Set-DebugInfo-Spare-0-for-handle_wrapper-lock.patch - patch_apply ole32-HGLOBALStream/0005-ole32-Allow-moving-a-being-reallocated-block-of-memo.patch - patch_apply ole32-HGLOBALStream/0006-ole32-Improve-thread-safety-of-HGLOBALStreamImpl_Rea.patch - patch_apply ole32-HGLOBALStream/0007-ole32-Improve-thread-safety-of-HGLOBALStreamImpl_Wri.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "ole32/tests: Add a bunch of tests for HGLOBAL based IStream::Clone.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "ole32: Add a check for hglobal pointer to GetHGlobalFromStream.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "ole32: Add a wrapper for memory block managed by HGLOBAL based IStream.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "ole32: Set DebugInfo->Spare[0] for handle_wrapper lock.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "ole32: Allow moving a being reallocated block of memory managed by HGLOBAL based IStream.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "ole32: Improve thread-safety of HGLOBALStreamImpl_Read.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "ole32: Improve thread-safety of HGLOBALStreamImpl_Write.", 1 },'; - ) >> "$patchlist" -fi - # Patchset oleaut32-CreateTypeLib # | # | This patchset fixes the following Wine bugs: diff --git a/patches/ws2_32-getaddrinfo/0001-ws2_32-Fix-handling-of-empty-string-in-WS_getaddrinf.patch b/patches/ws2_32-getaddrinfo/0001-ws2_32-Fix-handling-of-empty-string-in-WS_getaddrinf.patch index 6122f894..743c7272 100644 --- a/patches/ws2_32-getaddrinfo/0001-ws2_32-Fix-handling-of-empty-string-in-WS_getaddrinf.patch +++ b/patches/ws2_32-getaddrinfo/0001-ws2_32-Fix-handling-of-empty-string-in-WS_getaddrinf.patch @@ -1,7 +1,7 @@ -From b69f0c678ad23c7ee96ec82d18bf3162afe1dac6 Mon Sep 17 00:00:00 2001 +From 98db626566f8d4bcc0de8ad17fe0dabb685d69fe Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 31 Aug 2017 01:15:05 +0200 -Subject: ws2_32: Fix handling of empty string in WS_getaddrinfo. +Subject: [PATCH] ws2_32: Fix handling of empty string in WS_getaddrinfo. Fixes a regression introduced in a2053597cc326e2305c44e1c1a954c2e0ee2853e. --- @@ -9,10 +9,10 @@ Fixes a regression introduced in a2053597cc326e2305c44e1c1a954c2e0ee2853e. 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c -index dce52e8fd08..45764f5a359 100644 +index 4d2afa946b7..ed1ca2f44b9 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c -@@ -6634,6 +6634,22 @@ static int convert_eai_u2w(int unixret) { +@@ -6673,6 +6673,22 @@ static int convert_eai_u2w(int unixret) { return unixret; } @@ -35,7 +35,7 @@ index dce52e8fd08..45764f5a359 100644 static char *get_fqdn(void) { char *ret; -@@ -6659,9 +6675,8 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr +@@ -6698,9 +6714,8 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr struct addrinfo *unixaires = NULL; int result; struct addrinfo unixhints, *punixhints = NULL; @@ -46,7 +46,7 @@ index dce52e8fd08..45764f5a359 100644 *res = NULL; if (!nodename && !servname) -@@ -6670,16 +6685,20 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr +@@ -6709,16 +6724,20 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr return WSAHOST_NOT_FOUND; } @@ -72,7 +72,7 @@ index dce52e8fd08..45764f5a359 100644 else { node = nodename; -@@ -6694,6 +6713,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr +@@ -6733,6 +6752,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr nodeV6 = HeapAlloc(GetProcessHeap(), 0, close_bracket - node); if (!nodeV6) { @@ -80,7 +80,7 @@ index dce52e8fd08..45764f5a359 100644 HeapFree(GetProcessHeap(), 0, fqdn); return WSA_NOT_ENOUGH_MEMORY; } -@@ -6723,6 +6743,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr +@@ -6762,6 +6782,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr if (punixhints->ai_socktype < 0) { SetLastError(WSAESOCKTNOSUPPORT); @@ -88,16 +88,16 @@ index dce52e8fd08..45764f5a359 100644 HeapFree(GetProcessHeap(), 0, fqdn); HeapFree(GetProcessHeap(), 0, nodeV6); return SOCKET_ERROR; -@@ -6748,7 +6769,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr +@@ -6787,7 +6808,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr result = getaddrinfo(node, servname, punixhints, &unixaires); if (result && (!hints || !(hints->ai_flags & WS_AI_NUMERICHOST)) -- && (!strcmp(fqdn, node) || (!strncmp(fqdn, node, hostname_len) && !node[hostname_len]))) -+ && (!strcmp(node, hostname) || !strcmp(node, fqdn))) +- && node && (!strcmp(fqdn, node) || (!strncmp(fqdn, node, hostname_len) && !node[hostname_len]))) ++ && node && (!strcmp(node, hostname) || !strcmp(node, fqdn))) { /* If it didn't work it means the host name IP is not in /etc/hosts, try again * by sending a NULL host and avoid sending a NULL servname too because that -@@ -6757,6 +6778,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr +@@ -6796,6 +6817,7 @@ int WINAPI WS_getaddrinfo(LPCSTR nodename, LPCSTR servname, const struct WS_addr result = getaddrinfo(NULL, servname ? servname : "0", punixhints, &unixaires); } TRACE("%s, %s %p -> %p %d\n", debugstr_a(nodename), debugstr_a(servname), hints, res, result); @@ -106,5 +106,5 @@ index dce52e8fd08..45764f5a359 100644 HeapFree(GetProcessHeap(), 0, nodeV6); -- -2.14.1 +2.27.0 diff --git a/staging/upstream-commit b/staging/upstream-commit index 09ec5320..431927d9 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -1ec8bf9b739f1528b742169670eac2350b33a7d4 +03e9de4920173d3fa955cf28a8d2b60bd3b06261