Rebase against 9321aa40f5ba79352d346c04f4d428d143575fb9

This commit is contained in:
Alistair Leslie-Hughes 2018-05-16 08:02:03 +10:00
parent 93d16ba18b
commit 584fc68f0e
9 changed files with 5 additions and 444 deletions

View File

@ -1,26 +0,0 @@
From de9dbd542143b13741886c3e4b9f96ffcbfaa432 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Wed, 16 Mar 2016 05:46:33 +0100
Subject: dsound: Avoid implicit cast of interface pointer.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
---
dlls/dsound/primary.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dsound/primary.c b/dlls/dsound/primary.c
index 3f8a478..6f280f8 100644
--- a/dlls/dsound/primary.c
+++ b/dlls/dsound/primary.c
@@ -626,7 +626,7 @@ out:
static inline IDirectSoundBufferImpl *impl_from_IDirectSoundBuffer(IDirectSoundBuffer *iface)
{
/* IDirectSoundBuffer and IDirectSoundBuffer8 use the same iface. */
- return CONTAINING_RECORD(iface, IDirectSoundBufferImpl, IDirectSoundBuffer8_iface);
+ return CONTAINING_RECORD((IDirectSoundBuffer8 *)iface, IDirectSoundBufferImpl, IDirectSoundBuffer8_iface);
}
/* This sets this format for the primary buffer only */
--
2.7.1

View File

@ -1,106 +0,0 @@
From 27b806367185176be74cd3f2d7a733389e2925b9 Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucian.poston@gmail.com>
Date: Thu, 23 Nov 2017 09:50:41 -0800
Subject: [PATCH 1/2] d3d11: Test shader class instance count
https://bugs.winehq.org/show_bug.cgi?id=44052
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
---
dlls/d3d11/tests/d3d11.c | 32 +++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 63f964a..1345b0e 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -9688,7 +9688,7 @@ static void test_clear_state(void)
UINT sample_mask;
UINT stencil_ref;
ULONG refcount;
- UINT count, i;
+ UINT count, i, instance_count;
HRESULT hr;
device_desc.feature_level = &feature_level;
@@ -9719,8 +9719,11 @@ static void test_clear_state(void)
{
ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
}
- ID3D11DeviceContext_VSGetShader(context, &tmp_vs, NULL, 0);
+ instance_count = 100;
+ ID3D11DeviceContext_VSGetShader(context, &tmp_vs, NULL, &instance_count);
ok(!tmp_vs, "Got unexpected vertex shader %p.\n", tmp_vs);
+ todo_wine
+ ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_HSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
tmp_buffer);
@@ -9738,8 +9741,11 @@ static void test_clear_state(void)
{
ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
}
- ID3D11DeviceContext_HSGetShader(context, &tmp_hs, NULL, 0);
+ instance_count = 100;
+ ID3D11DeviceContext_HSGetShader(context, &tmp_hs, NULL, &instance_count);
ok(!tmp_hs, "Got unexpected hull shader %p.\n", tmp_hs);
+ todo_wine
+ ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_DSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
tmp_buffer);
@@ -9757,8 +9763,11 @@ static void test_clear_state(void)
{
ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
}
- ID3D11DeviceContext_DSGetShader(context, &tmp_ds, NULL, 0);
+ instance_count = 100;
+ ID3D11DeviceContext_DSGetShader(context, &tmp_ds, NULL, &instance_count);
ok(!tmp_ds, "Got unexpected domain shader %p.\n", tmp_ds);
+ todo_wine
+ ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_GSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
tmp_buffer);
@@ -9776,8 +9785,11 @@ static void test_clear_state(void)
{
ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
}
- ID3D11DeviceContext_GSGetShader(context, &tmp_gs, NULL, 0);
+ instance_count = 100;
+ ID3D11DeviceContext_GSGetShader(context, &tmp_gs, NULL, &instance_count);
ok(!tmp_gs, "Got unexpected geometry shader %p.\n", tmp_gs);
+ todo_wine
+ ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_PSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
tmp_buffer);
@@ -9796,8 +9808,11 @@ static void test_clear_state(void)
{
ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
}
- ID3D11DeviceContext_PSGetShader(context, &tmp_ps, NULL, 0);
+ instance_count = 100;
+ ID3D11DeviceContext_PSGetShader(context, &tmp_ps, NULL, &instance_count);
ok(!tmp_ps, "Got unexpected pixel shader %p.\n", tmp_ps);
+ todo_wine
+ ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_CSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
tmp_buffer);
@@ -9816,8 +9831,11 @@ static void test_clear_state(void)
{
ok(!tmp_sampler[i], "Got unexpected sampler %p in slot %u.\n", tmp_sampler[i], i);
}
- ID3D11DeviceContext_CSGetShader(context, &tmp_cs, NULL, 0);
+ instance_count = 100;
+ ID3D11DeviceContext_CSGetShader(context, &tmp_cs, NULL, &instance_count);
ok(!tmp_cs, "Got unexpected compute shader %p.\n", tmp_cs);
+ todo_wine
+ ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_CSGetUnorderedAccessViews(context, 0, D3D11_PS_CS_UAV_REGISTER_COUNT, tmp_uav);
for (i = 0; i < D3D11_PS_CS_UAV_REGISTER_COUNT; ++i)
{
--
1.9.1

View File

@ -1,129 +0,0 @@
From 56048495ec1b1a6d986b9d1ff74a5d541f67ce65 Mon Sep 17 00:00:00 2001
From: Lucian Poston <lucian.poston@gmail.com>
Date: Sat, 18 Nov 2017 21:46:35 -0800
Subject: [PATCH 2/2] d3d11: Return valid values for shader class instances
Instead of returning garbage data for class instances, return 0 class
instances.
https://bugs.winehq.org/show_bug.cgi?id=44052
Signed-off-by: Lucian Poston <lucian.poston@gmail.com>
---
dlls/d3d11/device.c | 12 ++++++++++++
dlls/d3d11/tests/d3d11.c | 6 ------
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 18fa670..f859e0f 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -1522,6 +1522,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_PSGetShader(ID3D11DeviceCo
if (class_instances || class_instance_count)
FIXME("Dynamic linking not implemented yet.\n");
+ if (class_instance_count)
+ *class_instance_count = 0;
wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_pixel_shader(device->wined3d_device)))
@@ -1577,6 +1579,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_VSGetShader(ID3D11DeviceCo
if (class_instances || class_instance_count)
FIXME("Dynamic linking not implemented yet.\n");
+ if (class_instance_count)
+ *class_instance_count = 0;
wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_vertex_shader(device->wined3d_device)))
@@ -1745,6 +1749,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_GSGetShader(ID3D11DeviceCo
if (class_instances || class_instance_count)
FIXME("Dynamic linking not implemented yet.\n");
+ if (class_instance_count)
+ *class_instance_count = 0;
wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_geometry_shader(device->wined3d_device)))
@@ -2187,6 +2193,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_HSGetShader(ID3D11DeviceCo
if (class_instances || class_instance_count)
FIXME("Dynamic linking not implemented yet.\n");
+ if (class_instance_count)
+ *class_instance_count = 0;
wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_hull_shader(device->wined3d_device)))
@@ -2294,6 +2302,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_DSGetShader(ID3D11DeviceCo
if (class_instances || class_instance_count)
FIXME("Dynamic linking not implemented yet.\n");
+ if (class_instance_count)
+ *class_instance_count = 0;
wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_domain_shader(device->wined3d_device)))
@@ -2426,6 +2436,8 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_CSGetShader(ID3D11DeviceCo
if (class_instances || class_instance_count)
FIXME("Dynamic linking not implemented yet.\n");
+ if (class_instance_count)
+ *class_instance_count = 0;
wined3d_mutex_lock();
if (!(wined3d_shader = wined3d_device_get_compute_shader(device->wined3d_device)))
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
index 1345b0e..72ca70f 100644
--- a/dlls/d3d11/tests/d3d11.c
+++ b/dlls/d3d11/tests/d3d11.c
@@ -9722,7 +9722,6 @@ static void test_clear_state(void)
instance_count = 100;
ID3D11DeviceContext_VSGetShader(context, &tmp_vs, NULL, &instance_count);
ok(!tmp_vs, "Got unexpected vertex shader %p.\n", tmp_vs);
- todo_wine
ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_HSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
@@ -9744,7 +9743,6 @@ static void test_clear_state(void)
instance_count = 100;
ID3D11DeviceContext_HSGetShader(context, &tmp_hs, NULL, &instance_count);
ok(!tmp_hs, "Got unexpected hull shader %p.\n", tmp_hs);
- todo_wine
ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_DSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
@@ -9766,7 +9764,6 @@ static void test_clear_state(void)
instance_count = 100;
ID3D11DeviceContext_DSGetShader(context, &tmp_ds, NULL, &instance_count);
ok(!tmp_ds, "Got unexpected domain shader %p.\n", tmp_ds);
- todo_wine
ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_GSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
@@ -9788,7 +9785,6 @@ static void test_clear_state(void)
instance_count = 100;
ID3D11DeviceContext_GSGetShader(context, &tmp_gs, NULL, &instance_count);
ok(!tmp_gs, "Got unexpected geometry shader %p.\n", tmp_gs);
- todo_wine
ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_PSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
@@ -9811,7 +9807,6 @@ static void test_clear_state(void)
instance_count = 100;
ID3D11DeviceContext_PSGetShader(context, &tmp_ps, NULL, &instance_count);
ok(!tmp_ps, "Got unexpected pixel shader %p.\n", tmp_ps);
- todo_wine
ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_CSGetConstantBuffers(context, 0, D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT,
@@ -9834,7 +9829,6 @@ static void test_clear_state(void)
instance_count = 100;
ID3D11DeviceContext_CSGetShader(context, &tmp_cs, NULL, &instance_count);
ok(!tmp_cs, "Got unexpected compute shader %p.\n", tmp_cs);
- todo_wine
ok(instance_count == 0, "Expected 0 instances, got %u.\n", instance_count);
ID3D11DeviceContext_CSGetUnorderedAccessViews(context, 0, D3D11_PS_CS_UAV_REGISTER_COUNT, tmp_uav);
for (i = 0; i < D3D11_PS_CS_UAV_REGISTER_COUNT; ++i)
--
1.9.1

View File

@ -1 +0,0 @@
Fixes: [44052] - Return a valid valud for shader count.

View File

@ -1,26 +0,0 @@
From 012441a764762063b3037d060769fea4356a295c Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 18 Apr 2018 03:55:14 +0000
Subject: [PATCH] dxgi: Return S_OK in SetMaximumFrameLatency
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
dlls/dxgi/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c
index c266cae..ee5f3e6 100644
--- a/dlls/dxgi/device.c
+++ b/dlls/dxgi/device.c
@@ -262,7 +262,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_SetMaximumFrameLatency(IWineDXGIDev
if (max_latency > DXGI_FRAME_LATENCY_MAX)
return DXGI_ERROR_INVALID_CALL;
- return E_NOTIMPL;
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_device_GetMaximumFrameLatency(IWineDXGIDevice *iface, UINT *max_latency)
--
1.9.1

View File

@ -1 +0,0 @@
Fixes: [44061] Return S_OK from GetMaximumFrameLatency

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "09bf88092d0748ceac355098a942b01b267e8773"
echo "9321aa40f5ba79352d346c04f4d428d143575fb9"
}
# Show version information
@ -111,7 +111,6 @@ patch_enable_all ()
enable_d3d11_Deferred_Context="$1"
enable_d3d11_Depth_Bias="$1"
enable_d3d11_dynamic_cpu_access="$1"
enable_d3d11_shader_count="$1"
enable_d3d8_ValidateShader="$1"
enable_d3d9_DesktopWindow="$1"
enable_d3d9_Tests="$1"
@ -150,7 +149,6 @@ patch_enable_all ()
enable_dxdiagn_GetChildContainer_Leaf_Nodes="$1"
enable_dxgi_GammaRamp="$1"
enable_dxgi_MakeWindowAssociation="$1"
enable_dxgi_SetMaximumFrameLatency="$1"
enable_dxva2_Video_Decoder="$1"
enable_explorer_Video_Registry_Key="$1"
enable_fonts_Missing_Fonts="$1"
@ -281,7 +279,6 @@ patch_enable_all ()
enable_quartz_Silence_FIXMEs="$1"
enable_riched20_Class_Tests="$1"
enable_riched20_IText_Interface="$1"
enable_secur32_Zero_Buffer_Length="$1"
enable_server_ClipCursor="$1"
enable_server_CreateProcess_ACLs="$1"
enable_server_Desktop_Refcount="$1"
@ -518,9 +515,6 @@ patch_enable ()
d3d11-dynamic-cpu-access)
enable_d3d11_dynamic_cpu_access="$2"
;;
d3d11-shader-count)
enable_d3d11_shader_count="$2"
;;
d3d8-ValidateShader)
enable_d3d8_ValidateShader="$2"
;;
@ -635,9 +629,6 @@ patch_enable ()
dxgi-MakeWindowAssociation)
enable_dxgi_MakeWindowAssociation="$2"
;;
dxgi-SetMaximumFrameLatency)
enable_dxgi_SetMaximumFrameLatency="$2"
;;
dxva2-Video_Decoder)
enable_dxva2_Video_Decoder="$2"
;;
@ -1028,9 +1019,6 @@ patch_enable ()
riched20-IText_Interface)
enable_riched20_IText_Interface="$2"
;;
secur32-Zero_Buffer_Length)
enable_secur32_Zero_Buffer_Length="$2"
;;
server-ClipCursor)
enable_server_ClipCursor="$2"
;;
@ -2379,15 +2367,14 @@ fi
# |
# | Modified files:
# | * dlls/amstream/mediastreamfilter.c, dlls/d2d1/brush.c, dlls/d2d1/geometry.c, dlls/d3d11/view.c, dlls/d3d8/texture.c,
# | dlls/d3d9/tests/visual.c, dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dsound/primary.c, dlls/dwrite/font.c,
# | dlls/dwrite/layout.c, dlls/evr/evr.c, dlls/msxml3/schema.c, dlls/netapi32/netapi32.c, dlls/oleaut32/oleaut.c,
# | dlls/rpcrt4/cstub.c, dlls/vbscript/vbdisp.c, dlls/wined3d/glsl_shader.c, dlls/ws2_32/tests/sock.c,
# | dlls/wsdapi/msgparams.c, include/wine/list.h, include/wine/rbtree.h, include/winnt.h, tools/makedep.c
# | dlls/d3d9/tests/visual.c, dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dwrite/font.c, dlls/dwrite/layout.c,
# | dlls/evr/evr.c, dlls/msxml3/schema.c, dlls/netapi32/netapi32.c, dlls/oleaut32/oleaut.c, dlls/rpcrt4/cstub.c,
# | dlls/vbscript/vbdisp.c, dlls/wined3d/glsl_shader.c, dlls/ws2_32/tests/sock.c, dlls/wsdapi/msgparams.c,
# | include/wine/list.h, include/wine/rbtree.h, include/winnt.h, tools/makedep.c
# |
if test "$enable_Compiler_Warnings" -eq 1; then
patch_apply Compiler_Warnings/0009-ws2_32-tests-Work-around-an-incorrect-detection-in-G.patch
patch_apply Compiler_Warnings/0018-Appease-the-blessed-version-of-gcc-4.5-when-Werror-i.patch
patch_apply Compiler_Warnings/0019-dsound-Avoid-implicit-cast-of-interface-pointer.patch
patch_apply Compiler_Warnings/0020-amstream-Avoid-implicit-cast-of-interface-pointer.patch
patch_apply Compiler_Warnings/0021-d2d1-Avoid-implicit-cast-of-interface-pointer.patch
patch_apply Compiler_Warnings/0022-d3d11-Avoid-implicit-cast-of-interface-pointer.patch
@ -2405,7 +2392,6 @@ if test "$enable_Compiler_Warnings" -eq 1; then
(
printf '%s\n' '+ { "Sebastian Lackner", "ws2_32/tests: Work around an incorrect detection in GCC 7.", 1 },';
printf '%s\n' '+ { "Erich E. Hoover", "Appease the blessed version of gcc (4.5) when -Werror is enabled.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "dsound: Avoid implicit cast of interface pointer.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "amstream: Avoid implicit cast of interface pointer.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "d2d1: Avoid implicit cast of interface pointer.", 1 },';
printf '%s\n' '+ { "Sebastian Lackner", "d3d11: Avoid implicit cast of interface pointer.", 1 },';
@ -3179,23 +3165,6 @@ if test "$enable_d3d11_dynamic_cpu_access" -eq 1; then
) >> "$patchlist"
fi
# Patchset d3d11-shader-count
# |
# | This patchset fixes the following Wine bugs:
# | * [#44052] - Return a valid valud for shader count.
# |
# | Modified files:
# | * dlls/d3d11/device.c, dlls/d3d11/tests/d3d11.c
# |
if test "$enable_d3d11_shader_count" -eq 1; then
patch_apply d3d11-shader-count/0001-d3d11-Test-shader-class-instance-count.patch
patch_apply d3d11-shader-count/0002-d3d11-Return-valid-values-for-shader-class-instances.patch
(
printf '%s\n' '+ { "Lucian Poston", "d3d11: Test shader class instance count.", 1 },';
printf '%s\n' '+ { "Lucian Poston", "d3d11: Return valid values for shader class instances.", 1 },';
) >> "$patchlist"
fi
# Patchset d3d8-ValidateShader
# |
# | This patchset fixes the following Wine bugs:
@ -3847,21 +3816,6 @@ if test "$enable_dxgi_MakeWindowAssociation" -eq 1; then
) >> "$patchlist"
fi
# Patchset dxgi-SetMaximumFrameLatency
# |
# | This patchset fixes the following Wine bugs:
# | * [#44061] Return S_OK from GetMaximumFrameLatency
# |
# | Modified files:
# | * dlls/dxgi/device.c
# |
if test "$enable_dxgi_SetMaximumFrameLatency" -eq 1; then
patch_apply dxgi-SetMaximumFrameLatency/0001-dxgi-Return-S_OK-in-SetMaximumFrameLatency.patch
(
printf '%s\n' '+ { "Alistair Leslie-Hughes", "dxgi: Return S_OK in SetMaximumFrameLatency.", 1 },';
) >> "$patchlist"
fi
# Patchset dxva2-Video_Decoder
# |
# | Modified files:
@ -6060,21 +6014,6 @@ if test "$enable_riched20_IText_Interface" -eq 1; then
) >> "$patchlist"
fi
# Patchset secur32-Zero_Buffer_Length
# |
# | This patchset fixes the following Wine bugs:
# | * [#40271] Set buffer size to zero when InitializeSecurityContextW returns no data
# |
# | Modified files:
# | * dlls/secur32/schannel.c, dlls/secur32/tests/schannel.c
# |
if test "$enable_secur32_Zero_Buffer_Length" -eq 1; then
patch_apply secur32-Zero_Buffer_Length/0001-secur32-Set-output-buffer-size-to-zero-during-handsh.patch
(
printf '%s\n' '+ { "Michael Müller", "secur32: Set output buffer size to zero during handshake when no data needs to be sent.", 1 },';
) >> "$patchlist"
fi
# Patchset server-ClipCursor
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,88 +0,0 @@
From 366f728c4ddfe2f4c23f049f572ff6858b3ceca5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 8 May 2016 21:52:06 +0200
Subject: secur32: Set output buffer size to zero during handshake when no data
needs to be sent.
---
dlls/secur32/schannel.c | 19 ++++++++++++-------
dlls/secur32/tests/schannel.c | 10 ++++++++--
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index 88b6521a7d8..cbfbc32ba1e 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -901,6 +901,18 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
/* Perform the TLS handshake */
ret = schan_imp_handshake(ctx->session);
+ out_buffers = &ctx->transport.out;
+ if (out_buffers->current_buffer_idx != -1)
+ {
+ SecBuffer *buffer = &out_buffers->desc->pBuffers[out_buffers->current_buffer_idx];
+ buffer->cbBuffer = out_buffers->offset;
+ }
+ else if (out_buffers->desc && out_buffers->desc->cBuffers > 0)
+ {
+ SecBuffer *buffer = &out_buffers->desc->pBuffers[0];
+ buffer->cbBuffer = 0;
+ }
+
if(ctx->transport.in.offset && ctx->transport.in.offset != pInput->pBuffers[0].cbBuffer) {
if(pInput->cBuffers<2 || pInput->pBuffers[1].BufferType!=SECBUFFER_EMPTY)
return SEC_E_INVALID_TOKEN;
@@ -909,13 +921,6 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
pInput->pBuffers[1].cbBuffer = pInput->pBuffers[0].cbBuffer-ctx->transport.in.offset;
}
- out_buffers = &ctx->transport.out;
- if (out_buffers->current_buffer_idx != -1)
- {
- SecBuffer *buffer = &out_buffers->desc->pBuffers[out_buffers->current_buffer_idx];
- buffer->cbBuffer = out_buffers->offset;
- }
-
*pfContextAttr = 0;
if (ctx->req_ctx_attr & ISC_REQ_REPLAY_DETECT)
*pfContextAttr |= ISC_RET_REPLAY_DETECT;
diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c
index b5ed169a978..110d4d8c397 100644
--- a/dlls/secur32/tests/schannel.c
+++ b/dlls/secur32/tests/schannel.c
@@ -771,7 +771,6 @@ todo_wine
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
0, 0, &buffers[1], 0, NULL, &buffers[0], &attrs, NULL);
ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
-todo_wine
ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
buffers[0].pBuffers[0].cbBuffer = 0;
@@ -781,9 +780,15 @@ todo_wine
todo_wine
ok(status == SEC_E_INSUFFICIENT_MEMORY || status == SEC_E_INVALID_TOKEN,
"Expected SEC_E_INSUFFICIENT_MEMORY or SEC_E_INVALID_TOKEN, got %08x\n", status);
+ ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
- buffers[0].pBuffers[0].cbBuffer = buf_size;
+ status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost",
+ ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
+ 0, 0, NULL, 0, &context, NULL, &attrs, NULL);
+todo_wine
+ ok(status == SEC_E_INVALID_TOKEN, "Expected SEC_E_INVALID_TOKEN, got %08x\n", status);
+ buffers[0].pBuffers[0].cbBuffer = buf_size;
status = InitializeSecurityContextA(&cred_handle, NULL, (SEC_CHAR *)"localhost",
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL);
@@ -858,6 +863,7 @@ todo_wine
buffers[1].pBuffers[0].cbBuffer = buf_size;
}
+ ok(buffers[0].pBuffers[0].cbBuffer == 0, "Output buffer size was not set to 0.\n");
ok(status == SEC_E_OK || broken(status == SEC_E_INVALID_TOKEN) /* WinNT */,
"InitializeSecurityContext failed: %08x\n", status);
if(status != SEC_E_OK) {
--
2.14.1

View File

@ -1 +0,0 @@
Fixes: [40271] Set buffer size to zero when InitializeSecurityContextW returns no data