winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2021
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
1051 discussions
Start a n
N
ew thread
Rémi Bernon : hidclass.sys: Create separate report queue for each opened handle.
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: 3a3e0ed2e9525667b9839ea2f218183182350022 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3a3e0ed2e9525667b9839ea2…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Aug 10 11:31:15 2021 +0200 hidclass.sys: Create separate report queue for each opened handle. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/hidclass.sys/device.c | 127 ++++++++++++++++++++++++------------- dlls/hidclass.sys/hid.h | 10 ++- dlls/hidclass.sys/pnp.c | 7 +- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 4 +- 4 files changed, 95 insertions(+), 53 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=3a3e0ed2e9525667b983…
1
0
0
0
Rémi Bernon : hidclass.sys: Rename WINE_HIDP_PREPARSED_DATA to struct hid_preparsed_data.
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: 2e3a0dac84e545a6454f2175b00aa22ab09ba81f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2e3a0dac84e545a6454f2175…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Aug 10 11:31:14 2021 +0200 hidclass.sys: Rename WINE_HIDP_PREPARSED_DATA to struct hid_preparsed_data. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/hid/hidp.c | 36 ++++++++++++++++++------------------ dlls/hidclass.sys/descriptor.c | 14 +++++++------- dlls/hidclass.sys/device.c | 28 ++++++++++++++-------------- dlls/hidclass.sys/hid.h | 4 ++-- dlls/hidclass.sys/pnp.c | 2 +- dlls/user32/rawinput.c | 2 +- include/wine/hid.h | 6 +++--- 7 files changed, 46 insertions(+), 46 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2e3a0dac84e545a6454f…
1
0
0
0
Alistair Leslie-Hughes : hid: Validate preparsed data pointer passed in HidP functions.
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: 656691feb7d3ff979f255ac3c730ac357e4cbccd URL:
https://source.winehq.org/git/wine.git/?a=commit;h=656691feb7d3ff979f255ac3…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Aug 10 11:31:13 2021 +0200 hid: Validate preparsed data pointer passed in HidP functions. Power Rangers: Battle for the Grid. 0514:trace:hidp:HidP_GetCaps preparsed_data 000000004C9566B0, caps 000000000010EF00. 0514:trace:hidp:HidP_GetCaps preparsed_data 0000000000000000, caps 000000000010F020. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/hid/hidp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index 6259e0f56a9..37715ccfbca 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -39,7 +39,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(hidp); static NTSTATUS get_value_caps_range( WINE_HIDP_PREPARSED_DATA *preparsed, HIDP_REPORT_TYPE report_type, ULONG report_len, const struct hid_value_caps **caps, const struct hid_value_caps **caps_end ) { - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; switch (report_type) { @@ -167,7 +167,7 @@ NTSTATUS WINAPI HidP_GetCaps( PHIDP_PREPARSED_DATA preparsed_data, HIDP_CAPS *ca TRACE( "preparsed_data %p, caps %p.\n", preparsed_data, caps ); - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; *caps = preparsed->caps; return HIDP_STATUS_SUCCESS; @@ -787,7 +787,7 @@ NTSTATUS WINAPI HidP_GetLinkCollectionNodes( HIDP_LINK_COLLECTION_NODE *nodes, U TRACE( "nodes %p, nodes_len %p, preparsed_data %p.\n", nodes, nodes_len, preparsed_data ); - if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; + if (!preparsed || preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA; count = *nodes_len = preparsed->caps.NumberLinkCollectionNodes; if (capacity < count) return HIDP_STATUS_BUFFER_TOO_SMALL;
1
0
0
0
Ziqing Hui : d2d1: Implement d2d_effect_GetValue().
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: 77930f1fe2544eb24390e9f8be3ab9a1a633ca70 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=77930f1fe2544eb24390e9f8…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Tue Aug 10 12:05:14 2021 +0800 d2d1: Implement d2d_effect_GetValue(). Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/effect.c | 38 +++++++++++++++++++++++++++++++++++--- dlls/d2d1/tests/d2d1.c | 8 +++++--- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index ef1189ba042..5f334d19f71 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -164,10 +164,42 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName(ID2D1Effect *iface, c static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type, BYTE *value, UINT32 value_size) { - FIXME("iface %p, index %u, type %#x, value %p, value_size %u stub!\n", iface, index, type, - value, value_size); + struct d2d_effect *effect = impl_from_ID2D1Effect(iface); + const void *src; - return E_NOTIMPL; + TRACE("iface %p, index %u, type %#x, value %p, value_size %u.\n", iface, index, type, value, value_size); + + switch (index) + { + case D2D1_PROPERTY_CLSID: + if ((type != D2D1_PROPERTY_TYPE_UNKNOWN && type != D2D1_PROPERTY_TYPE_CLSID) + || value_size != sizeof(*effect->info->clsid)) + return E_INVALIDARG; + src = effect->info->clsid; + break; + case D2D1_PROPERTY_MIN_INPUTS: + if ((type != D2D1_PROPERTY_TYPE_UNKNOWN && type != D2D1_PROPERTY_TYPE_UINT32) + || value_size != sizeof(effect->info->min_inputs)) + return E_INVALIDARG; + src = &effect->info->min_inputs; + break; + case D2D1_PROPERTY_MAX_INPUTS: + if ((type != D2D1_PROPERTY_TYPE_UNKNOWN && type != D2D1_PROPERTY_TYPE_UINT32) + || value_size != sizeof(effect->info->max_inputs)) + return E_INVALIDARG; + src = &effect->info->max_inputs; + break; + default: + if (index < D2D1_PROPERTY_CLSID) + FIXME("Custom properties are not supported.\n"); + else if (index <= D2D1_PROPERTY_MAX_INPUTS) + FIXME("Standard property %#x is not supported.\n", index); + return D2DERR_INVALID_PROPERTY; + } + + memcpy(value, src, value_size); + + return S_OK; } static UINT32 STDMETHODCALLTYPE d2d_effect_GetValueSize(ID2D1Effect *iface, UINT32 index) diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index f655274754e..343a2363e14 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -9738,8 +9738,6 @@ static void test_effect(BOOL d3d11) ID2D1Image_Release(image_b); ID2D1Image_Release(image_a); - todo_wine - { hr = ID2D1Effect_GetValue(effect, 0xdeadbeef, D2D1_PROPERTY_TYPE_CLSID, (BYTE *)&clsid, sizeof(clsid)); ok(hr == D2DERR_INVALID_PROPERTY, "Got unexpected hr %#x.\n", hr); @@ -9751,11 +9749,14 @@ static void test_effect(BOOL d3d11) ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, sizeof(buffer)); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); str_size = (wcslen((WCHAR *)buffer) + 1) * sizeof(WCHAR); hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size - 1); + todo_wine ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#x.\n", hr); hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, 0xdeadbeef, (BYTE *)&clsid, sizeof(clsid)); @@ -9776,12 +9777,14 @@ static void test_effect(BOOL d3d11) hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CACHED, D2D1_PROPERTY_TYPE_BOOL, (BYTE *)&cached, sizeof(cached)); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); if (hr == S_OK) ok(cached == FALSE, "Got unexpected cached %d.\n", cached); hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_PRECISION, D2D1_PROPERTY_TYPE_ENUM, (BYTE *)&precision, sizeof(precision)); + todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); if (hr == S_OK) ok(precision == D2D1_BUFFER_PRECISION_UNKNOWN, "Got unexpected precision %u.\n", precision); @@ -9799,7 +9802,6 @@ static void test_effect(BOOL d3d11) if (hr == S_OK) ok(max_inputs == test->max_inputs, "Got unexpected max inputs %u, expected %u.\n", max_inputs, test->max_inputs); - } input_count = ID2D1Effect_GetInputCount(effect); ok (input_count == test->default_input_count, "Got unexpected input count %u, expected %u.\n",
1
0
0
0
Ziqing Hui : d2d1: Implement d2d_effect_SetInputCount().
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: a60e45b64b00ec7e5c9948fbde5410b7c8ece1ea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a60e45b64b00ec7e5c9948fb…
Author: Ziqing Hui <zhui(a)codeweavers.com> Date: Tue Aug 10 12:05:13 2021 +0800 d2d1: Implement d2d_effect_SetInputCount(). Signed-off-by: Ziqing Hui <zhui(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d2d1/d2d1_private.h | 10 +++++++++ dlls/d2d1/effect.c | 55 +++++++++++++++++++++++++++++++----------------- dlls/d2d1/tests/d2d1.c | 2 -- 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/dlls/d2d1/d2d1_private.h b/dlls/d2d1/d2d1_private.h index 88c712cf51c..e823b2092bf 100644 --- a/dlls/d2d1/d2d1_private.h +++ b/dlls/d2d1/d2d1_private.h @@ -565,12 +565,22 @@ struct d2d_device void d2d_device_init(struct d2d_device *device, ID2D1Factory1 *factory, IDXGIDevice *dxgi_device) DECLSPEC_HIDDEN; +struct d2d_effect_info +{ + const CLSID *clsid; + UINT32 default_input_count; + UINT32 min_inputs; + UINT32 max_inputs; +}; + struct d2d_effect { ID2D1Effect ID2D1Effect_iface; ID2D1Image ID2D1Image_iface; LONG refcount; + const struct d2d_effect_info *info; + ID2D1Factory *factory; ID2D1Image **inputs; size_t inputs_size; diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c index 560d87479a9..ef1189ba042 100644 --- a/dlls/d2d1/effect.c +++ b/dlls/d2d1/effect.c @@ -20,17 +20,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(d2d); -struct d2d_effect_info -{ - const CLSID *clsid; - UINT32 default_input_count; -}; - static const struct d2d_effect_info builtin_effects[] = { - {&CLSID_D2D12DAffineTransform, 1}, - {&CLSID_D2D13DPerspectiveTransform, 1}, - {&CLSID_D2D1Composite, 2} + {&CLSID_D2D12DAffineTransform, 1, 1, 1}, + {&CLSID_D2D13DPerspectiveTransform, 1, 1, 1}, + {&CLSID_D2D1Composite, 2, 1, 0xffffffff} }; static inline struct d2d_effect *impl_from_ID2D1Effect(ID2D1Effect *iface) @@ -207,9 +201,38 @@ static void STDMETHODCALLTYPE d2d_effect_SetInput(ID2D1Effect *iface, UINT32 ind static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UINT32 count) { - FIXME("iface %p, count %u stub!\n", iface, count); + struct d2d_effect *effect = impl_from_ID2D1Effect(iface); + unsigned int i; - return E_NOTIMPL; + TRACE("iface %p, count %u.\n", iface, count); + + if (count < effect->info->min_inputs || count > effect->info->max_inputs) + return E_INVALIDARG; + if (count == effect->input_count) + return S_OK; + + if (count < effect->input_count) + { + for (i = count; i < effect->input_count; ++i) + { + if (effect->inputs[i]) + ID2D1Image_Release(effect->inputs[i]); + } + effect->input_count = count; + return S_OK; + } + + if (!d2d_array_reserve((void **)&effect->inputs, &effect->inputs_size, + count, sizeof(*effect->inputs))) + { + ERR("Failed to resize inputs array.\n"); + return E_OUTOFMEMORY; + } + + memset(&effect->inputs[effect->input_count], 0, sizeof(*effect->inputs) * (count - effect->input_count)); + effect->input_count = count; + + return S_OK; } static void STDMETHODCALLTYPE d2d_effect_GetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image **input) @@ -326,15 +349,9 @@ HRESULT d2d_effect_init(struct d2d_effect *effect, ID2D1Factory *factory, const { if (IsEqualGUID(effect_id, builtin_effects[i].clsid)) { - effect->input_count = builtin_effects[i].default_input_count; - - if (!d2d_array_reserve((void **)&effect->inputs, &effect->inputs_size, - effect->input_count, sizeof(*effect->inputs))) - return E_OUTOFMEMORY; - memset(effect->inputs, 0, sizeof(*effect->inputs) * effect->input_count); - + effect->info = &builtin_effects[i]; + d2d_effect_SetInputCount(&effect->ID2D1Effect_iface, effect->info->default_input_count); ID2D1Factory_AddRef(effect->factory = factory); - return S_OK; } } diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index a6f7ac88d0d..f655274754e 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -9811,10 +9811,8 @@ static void test_effect(BOOL d3d11) winetest_push_context("Input %u", j); hr = ID2D1Effect_SetInputCount(effect, j); if (j < test->min_inputs || j > test->max_inputs) - todo_wine ok(hr == E_INVALIDARG, "Got unexpected hr %#x.\n", hr); else - todo_wine ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); winetest_pop_context(); }
1
0
0
0
Zebediah Figura : kernelbase: Return HKEY_PERFORMANCE_TEXT when trying to open the Perflib\009 key.
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: 1ab13117081d7d7eca74ca724e39a41583b78fda URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1ab13117081d7d7eca74ca72…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sat Aug 7 18:22:23 2021 -0500 kernelbase: Return HKEY_PERFORMANCE_TEXT when trying to open the Perflib\009 key. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 4 ++-- dlls/kernelbase/registry.c | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 829bf3b0c61..4daf40b7aad 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -3832,10 +3832,10 @@ static void test_perflib_key(void) ok(!ret, "got %u\n", ret); ret = RegOpenKeyExA(perflib_key, "009", 0, KEY_READ, &key); - todo_wine ok(!ret, "got %u\n", ret); + ok(!ret, "got %u\n", ret); /* English always returns TEXT; most other languages return NLSTEXT, but * some (e.g. Hindi) return TEXT */ - todo_wine ok(key == HKEY_PERFORMANCE_TEXT || key == HKEY_PERFORMANCE_NLSTEXT, "got key %p\n", key); + ok(key == HKEY_PERFORMANCE_TEXT || key == HKEY_PERFORMANCE_NLSTEXT, "got key %p\n", key); ret = RegCloseKey(key); ok(!ret, "got %u\n", ret); diff --git a/dlls/kernelbase/registry.c b/dlls/kernelbase/registry.c index 2ed5e268119..d9d62e81b31 100644 --- a/dlls/kernelbase/registry.c +++ b/dlls/kernelbase/registry.c @@ -121,6 +121,25 @@ static HANDLE open_wow6432node( HANDLE key ) return ret; } +static HKEY get_perflib_key( HANDLE key ) +{ + static const WCHAR performance_text[] = + L"\\Registry\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib\\009"; + char buffer[200]; + OBJECT_NAME_INFORMATION *info = (OBJECT_NAME_INFORMATION *)buffer; + + if (!NtQueryObject( key, ObjectNameInformation, buffer, sizeof(buffer), NULL )) + { + if (!wcsicmp( info->Name.Buffer, performance_text )) + { + NtClose( key ); + return HKEY_PERFORMANCE_TEXT; + } + } + + return key; +} + /* wrapper for NtCreateKey that creates the key recursively if necessary */ static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr, const UNICODE_STRING *class, ULONG options, PULONG dispos ) @@ -172,7 +191,7 @@ static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES options & ~REG_OPTION_CREATE_LINK, dispos ); } if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); - if (status) return status; + if (!NT_SUCCESS(status)) return status; if (i == len) break; attr->RootDirectory = subkey; while (i < len && buffer[i] == '\\') i++; @@ -186,6 +205,11 @@ static NTSTATUS create_key( HKEY *retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); attr->RootDirectory = subkey; } + if (status == STATUS_PREDEFINED_HANDLE) + { + attr->RootDirectory = get_perflib_key( attr->RootDirectory ); + status = STATUS_SUCCESS; + } *retkey = attr->RootDirectory; return status; } @@ -205,7 +229,13 @@ static NTSTATUS open_key( HKEY *retkey, DWORD options, ACCESS_MASK access, OBJEC if (!force_wow32) { if (options & REG_OPTION_OPEN_LINK) attr->Attributes |= OBJ_OPENLINK; - return NtOpenKeyEx( (HANDLE *)retkey, access, attr, options ); + status = NtOpenKeyEx( (HANDLE *)retkey, access, attr, options ); + if (status == STATUS_PREDEFINED_HANDLE) + { + *retkey = get_perflib_key( *retkey ); + status = STATUS_SUCCESS; + } + return status; } if (len && buffer[0] == '\\') return STATUS_OBJECT_PATH_INVALID; @@ -249,6 +279,11 @@ static NTSTATUS open_key( HKEY *retkey, DWORD options, ACCESS_MASK access, OBJEC if (attr->RootDirectory != root) NtClose( attr->RootDirectory ); attr->RootDirectory = subkey; } + if (status == STATUS_PREDEFINED_HANDLE) + { + attr->RootDirectory = get_perflib_key( attr->RootDirectory ); + status = STATUS_SUCCESS; + } *retkey = attr->RootDirectory; return status; }
1
0
0
0
Zebediah Figura : server: Create the special Perflib\009 key.
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: 70e95447f9d20542c665fd34f3691f0f526e93e7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=70e95447f9d20542c665fd34…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sat Aug 7 18:22:22 2021 -0500 server: Create the special Perflib\009 key. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 4 ++-- server/registry.c | 52 ++++++++++++++++++++++++++++++++++++++++++ server/trace.c | 1 + 3 files changed, 55 insertions(+), 2 deletions(-) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index cdf9b18f5d1..829bf3b0c61 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -3838,12 +3838,12 @@ static void test_perflib_key(void) todo_wine ok(key == HKEY_PERFORMANCE_TEXT || key == HKEY_PERFORMANCE_NLSTEXT, "got key %p\n", key); ret = RegCloseKey(key); - todo_wine ok(!ret, "got %u\n", ret); + ok(!ret, "got %u\n", ret); RtlInitUnicodeString(&string, L"009"); InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, perflib_key, NULL); ret = NtOpenKey((HANDLE *)&key, KEY_ALL_ACCESS, &attr); - todo_wine ok(ret == STATUS_PREDEFINED_HANDLE || ret == STATUS_ACCESS_DENIED + ok(ret == STATUS_PREDEFINED_HANDLE || ret == STATUS_ACCESS_DENIED || ret == STATUS_SUCCESS /* Win < 7 */, "got %#x\n", ret); if (ret == STATUS_PREDEFINED_HANDLE) ok(!is_special_key(key), "expected a normal handle, got %p\n", key); diff --git a/server/registry.c b/server/registry.c index b7971770728..427da8a5883 100644 --- a/server/registry.c +++ b/server/registry.c @@ -101,6 +101,7 @@ struct key #define KEY_SYMLINK 0x0008 /* key is a symbolic link */ #define KEY_WOW64 0x0010 /* key contains a Wow6432Node subkey */ #define KEY_WOWSHARE 0x0020 /* key is a Wow64 shared key (used for Software\Classes) */ +#define KEY_PREDEF 0x0040 /* key is marked as predefined */ /* a key value */ struct key_value @@ -801,6 +802,7 @@ static struct key *open_key( struct key *key, const struct unicode_str *name, un return NULL; } if (debug_level > 1) dump_operation( key, NULL, "Open" ); + if (key->flags & KEY_PREDEF) set_error( STATUS_PREDEFINED_HANDLE ); grab_object( key ); return key; } @@ -831,6 +833,7 @@ static struct key *create_key( struct key *key, const struct unicode_str *name, return NULL; } if (debug_level > 1) dump_operation( key, NULL, "Open" ); + if (key->flags & KEY_PREDEF) set_error( STATUS_PREDEFINED_HANDLE ); grab_object( key ); return key; } @@ -925,6 +928,12 @@ static void enum_key( struct key *key, int index, int info_class, struct enum_ke WCHAR *fullname = NULL; char *data; + if (key->flags & KEY_PREDEF) + { + set_error( STATUS_INVALID_HANDLE ); + return; + } + if (index != -1) /* -1 means use the specified key directly */ { if ((index < 0) || (index > key->last_subkey)) @@ -1020,6 +1029,12 @@ static int delete_key( struct key *key, int recurse ) } assert( parent ); + if (key->flags & KEY_PREDEF) + { + set_error( STATUS_INVALID_HANDLE ); + return -1; + } + while (recurse && (key->last_subkey>=0)) if (0 > delete_key(key->subkeys[key->last_subkey], 1)) return -1; @@ -1126,6 +1141,12 @@ static void set_value( struct key *key, const struct unicode_str *name, void *ptr = NULL; int index; + if (key->flags & KEY_PREDEF) + { + set_error( STATUS_INVALID_HANDLE ); + return; + } + if ((value = find_value( key, name, &index ))) { /* check if the new value is identical to the existing one */ @@ -1172,6 +1193,12 @@ static void get_value( struct key *key, const struct unicode_str *name, int *typ struct key_value *value; int index; + if (key->flags & KEY_PREDEF) + { + set_error( STATUS_INVALID_HANDLE ); + return; + } + if ((value = find_value( key, name, &index ))) { *type = value->type; @@ -1191,6 +1218,12 @@ static void enum_value( struct key *key, int i, int info_class, struct enum_key_ { struct key_value *value; + if (key->flags & KEY_PREDEF) + { + set_error( STATUS_INVALID_HANDLE ); + return; + } + if (i < 0 || i > key->last_value) set_error( STATUS_NO_MORE_ENTRIES ); else { @@ -1243,6 +1276,12 @@ static void delete_value( struct key *key, const struct unicode_str *name ) struct key_value *value; int i, index, nb_values; + if (key->flags & KEY_PREDEF) + { + set_error( STATUS_INVALID_HANDLE ); + return; + } + if (!(value = find_value( key, name, &index ))) { set_error( STATUS_OBJECT_NAME_NOT_FOUND ); @@ -1817,9 +1856,16 @@ void init_registry(void) static const WCHAR classes_arm64[] = {'S','o','f','t','w','a','r','e','\\', 'C','l','a','s','s','e','s','\\', 'W','o','w','A','A','6','4','N','o','d','e'}; + static const WCHAR perflib[] = {'S','o','f','t','w','a','r','e','\\', + 'M','i','c','r','o','s','o','f','t','\\', + 'W','i','n','d','o','w','s',' ','N','T','\\', + 'C','u','r','r','e','n','t','V','e','r','s','i','o','n','\\', + 'P','e','r','f','l','i','b','\\', + '0','0','9'}; static const struct unicode_str root_name = { NULL, 0 }; static const struct unicode_str HKLM_name = { HKLM, sizeof(HKLM) }; static const struct unicode_str HKU_name = { HKU_default, sizeof(HKU_default) }; + static const struct unicode_str perflib_name = { perflib, sizeof(perflib) }; WCHAR *current_user_path; struct unicode_str current_user_str; @@ -1891,6 +1937,12 @@ void init_registry(void) /* FIXME: handle HKCU too */ } + if ((key = create_key_recursive( hklm, &perflib_name, current_time ))) + { + key->flags |= KEY_PREDEF; + release_object( key ); + } + release_object( hklm ); release_object( hkcu ); diff --git a/server/trace.c b/server/trace.c index 4110b740621..4e91d933a5d 100644 --- a/server/trace.c +++ b/server/trace.c @@ -5499,6 +5499,7 @@ static const struct { "PIPE_LISTENING", STATUS_PIPE_LISTENING }, { "PIPE_NOT_AVAILABLE", STATUS_PIPE_NOT_AVAILABLE }, { "PORT_NOT_SET", STATUS_PORT_NOT_SET }, + { "PREDEFINED_HANDLE", STATUS_PREDEFINED_HANDLE }, { "PRIVILEGE_NOT_HELD", STATUS_PRIVILEGE_NOT_HELD }, { "PROCESS_IN_JOB", STATUS_PROCESS_IN_JOB }, { "PROCESS_IS_TERMINATING", STATUS_PROCESS_IS_TERMINATING },
1
0
0
0
Zebediah Figura : advapi32/tests: Add some test for perflib keys.
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: e6a183f5ecfd51b87fef5600cd799c9d0c71e8a3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e6a183f5ecfd51b87fef5600…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sat Aug 7 18:22:21 2021 -0500 advapi32/tests: Add some test for perflib keys. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/advapi32/tests/registry.c | 139 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index 72423eae94c..cdf9b18f5d1 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -99,6 +99,11 @@ static void InitFunctionPtrs(void) pNtUnloadKey = (void *)GetProcAddress( hntdll, "NtUnloadKey" ); } +static BOOL is_special_key(HKEY key) +{ + return !!((ULONG_PTR)key & 0x80000000); +} + /* delete key and all its subkeys */ static DWORD delete_key( HKEY hkey ) { @@ -3809,6 +3814,139 @@ todo_wine ok(dwret == ERROR_SUCCESS, "got %u\n", dwret); } +static void test_perflib_key(void) +{ + unsigned int primary_lang = PRIMARYLANGID(GetUserDefaultLangID()); + unsigned int buffer_size = 1024 * 1024; + OBJECT_NAME_INFORMATION *name_info; + HKEY perflib_key, key, key2; + OBJECT_ATTRIBUTES attr; + UNICODE_STRING string; + char lang_name[4]; + char *buffer; + DWORD size; + LONG ret; + + ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, + "Software\\Microsoft\\Windows NT\\CurrentVersion\\Perflib", 0, KEY_READ, &perflib_key); + ok(!ret, "got %u\n", ret); + + ret = RegOpenKeyExA(perflib_key, "009", 0, KEY_READ, &key); + todo_wine ok(!ret, "got %u\n", ret); + /* English always returns TEXT; most other languages return NLSTEXT, but + * some (e.g. Hindi) return TEXT */ + todo_wine ok(key == HKEY_PERFORMANCE_TEXT || key == HKEY_PERFORMANCE_NLSTEXT, "got key %p\n", key); + + ret = RegCloseKey(key); + todo_wine ok(!ret, "got %u\n", ret); + + RtlInitUnicodeString(&string, L"009"); + InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, perflib_key, NULL); + ret = NtOpenKey((HANDLE *)&key, KEY_ALL_ACCESS, &attr); + todo_wine ok(ret == STATUS_PREDEFINED_HANDLE || ret == STATUS_ACCESS_DENIED + || ret == STATUS_SUCCESS /* Win < 7 */, "got %#x\n", ret); + if (ret == STATUS_PREDEFINED_HANDLE) + ok(!is_special_key(key), "expected a normal handle, got %p\n", key); + else if (ret == STATUS_SUCCESS) + ok(key == HKEY_PERFORMANCE_TEXT, "got key %p\n", key); + else + { + skip("Not enough permissions to test the perflib key.\n"); + RegCloseKey(perflib_key); + return; + } + + buffer = malloc(buffer_size); + + ret = NtQueryKey(key, KeyFullInformation, buffer, buffer_size, &size); + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + + ret = NtEnumerateKey(key, 0, KeyFullInformation, buffer, buffer_size, &size); + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + + RtlInitUnicodeString(&string, L"counter"); + ret = NtQueryValueKey(key, &string, KeyValuePartialInformation, buffer, buffer_size, &size); + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + + ret = NtEnumerateValueKey(key, 0, KeyValuePartialInformation, buffer, buffer_size, &size); + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + + ret = NtSetValueKey(key, &string, 0, REG_SZ, "test", 5); + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + + ret = NtDeleteValueKey(key, &string); + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + + ret = NtDeleteKey(key); + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + + RtlInitUnicodeString(&string, L"subkey"); + InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, key, NULL); + ret = NtOpenKey((HANDLE *)&key2, KEY_READ, &attr); + if (is_special_key(key)) + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + else + ok(ret == STATUS_OBJECT_NAME_NOT_FOUND + || broken(ret == STATUS_INVALID_HANDLE) /* WoW64 */, "got %#x\n", ret); + + ret = NtCreateKey((HANDLE *)&key2, KEY_ALL_ACCESS, &attr, 0, NULL, 0, NULL); + if (is_special_key(key)) + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + else + ok(!ret || broken(ret == STATUS_ACCESS_DENIED) /* w8adm */ + || broken(ret == STATUS_INVALID_HANDLE) /* WoW64 */, "got %#x\n", ret); + if (!ret) + { + NtDeleteKey(key2); + NtClose(key2); + } + + /* it's a real handle, though */ + ret = NtQueryObject(key, ObjectNameInformation, buffer, buffer_size, &size); + if (is_special_key(key)) + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + else + ok(!ret, "got %#x\n", ret); + if (!ret) + { + name_info = (OBJECT_NAME_INFORMATION *)buffer; + ok(!wcsicmp(name_info->Name.Buffer, L"\\REGISTRY\\MACHINE\\SOFTWARE\\Microsoft\\Windows NT" + "\\CurrentVersion\\Perflib\\009"), "got name %s\n", debugstr_w(name_info->Name.Buffer)); + } + + ret = NtClose(key); + if (is_special_key(key)) + ok(ret == STATUS_INVALID_HANDLE, "got %#x\n", ret); + else + ok(!ret, "got %#x\n", ret); + + /* multilingual support was not really completely thought through */ + + sprintf(lang_name, "%03x", primary_lang); + if (primary_lang != LANG_ENGLISH) + { + ret = RegOpenKeyExA(perflib_key, lang_name, 0, KEY_READ, &key); + todo_wine ok(!ret, "got %u\n", ret); + ok(!is_special_key(key), "expected a normal handle, got %p\n", key); + + ret = RegQueryValueExA(key, "counter", NULL, NULL, (BYTE *)buffer, &size); + todo_wine ok(ret == ERROR_FILE_NOT_FOUND, "got %u\n", ret); + + ret = RegCloseKey(key); + todo_wine ok(!ret, "got %u\n", ret); + } + + ret = RegCloseKey(perflib_key); + ok(!ret, "got %u\n", ret); + + RtlInitUnicodeString(&string, L"\\Registry\\PerfData"); + InitializeObjectAttributes(&attr, &string, OBJ_CASE_INSENSITIVE, NULL, NULL); + ret = NtOpenKey((HANDLE *)&key, KEY_READ, &attr); + todo_wine ok(ret == STATUS_OBJECT_NAME_NOT_FOUND, "got %#x\n", ret); + + free(buffer); +} + static void test_RegLoadMUIString(void) { HMODULE hUser32, hResDll, hFile; @@ -4213,6 +4351,7 @@ START_TEST(registry) test_RegQueryValueExPerformanceData(); test_RegLoadMUIString(); test_EnumDynamicTimeZoneInformation(); + test_perflib_key(); /* cleanup */ delete_key( hkey_main );
1
0
0
0
Zebediah Figura : server: Fix the parameter size check for IOCTL_AFD_EVENT_SELECT.
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: acc1861ed06323585cadc161b2880c8128c1d40b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=acc1861ed06323585cadc161…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Aug 9 16:35:35 2021 -0500 server: Fix the parameter size check for IOCTL_AFD_EVENT_SELECT. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- server/sock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/sock.c b/server/sock.c index 2660cf2dee0..27477200ed0 100644 --- a/server/sock.c +++ b/server/sock.c @@ -2420,7 +2420,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) { const struct afd_event_select_params_64 *params = get_req_data(); - if (get_req_data_size() < sizeof(params)) + if (get_req_data_size() < sizeof(*params)) { set_error( STATUS_INVALID_PARAMETER ); return 1; @@ -2433,7 +2433,7 @@ static int sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) { const struct afd_event_select_params_32 *params = get_req_data(); - if (get_req_data_size() < sizeof(params)) + if (get_req_data_size() < sizeof(*params)) { set_error( STATUS_INVALID_PARAMETER ); return 1;
1
0
0
0
Francois Gouget : server: Remove obsolete synthesized formats in release_clipboard().
by Alexandre Julliard
10 Aug '21
10 Aug '21
Module: wine Branch: master Commit: a716b13974b43bd0dd80322fd8584cc96f2f8f3b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a716b13974b43bd0dd80322f…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Tue Aug 10 05:51:46 2021 +0200 server: Remove obsolete synthesized formats in release_clipboard(). Synthesized formats must be removed too if the format they depend on has been removed. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51496
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/clipboard.c | 7 +++---- server/clipboard.c | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index 8515ba5b88a..b673fc1add5 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -973,7 +973,7 @@ static void test_synthesized(void) /* CF_UNICODETEXT and derivatives, CF_TEXT + CF_OEMTEXT, should be gone */ count = CountClipboardFormats(); - todo_wine ok(count == 1, "count %u\n", count ); + ok(count == 1, "count %u\n", count ); cf = EnumClipboardFormats( 0 ); ok(cf == CF_LOCALE, "unexpected clipboard format %u\n", cf); @@ -984,10 +984,9 @@ static void test_synthesized(void) ok(r, "gle %d\n", GetLastError()); SetLastError(0xdeadbeef); - data = (void*)1; if (broken(1)) /* FIXME Crashes in Wine */ data = GetClipboardData( CF_TEXT ); - ok(GetLastError() == 0xdeadbeef, "unexpected last error %d\n", GetLastError()); - todo_wine ok(!data, "GetClipboardData() should have returned NULL\n"); + ok(GetLastError() == 0xdeadbeef, "bad last error %d\n", GetLastError()); + ok(!data, "GetClipboardData() should have returned NULL\n"); r = CloseClipboard(); ok(r, "gle %d\n", GetLastError()); diff --git a/server/clipboard.c b/server/clipboard.c index 1c4875ff726..eb9bd4f7020 100644 --- a/server/clipboard.c +++ b/server/clipboard.c @@ -303,7 +303,11 @@ static user_handle_t release_clipboard( struct clipboard *clipboard ) /* free the delayed-rendered formats, since we no longer have an owner to render them */ LIST_FOR_EACH_ENTRY_SAFE( format, next, &clipboard->formats, struct clip_format, entry ) { - if (format->data || format->from) continue; + if (format->data) continue; + /* format->from is earlier in the list and thus has already been + * removed if not available anymore (it is also < CF_MAX) + */ + if (format->from && HAS_FORMAT( clipboard->format_map, format->from )) continue; list_remove( &format->entry ); if (format->id < CF_MAX) clipboard->format_map &= ~(1 << format->id); clipboard->format_count--;
1
0
0
0
← Newer
1
...
72
73
74
75
76
77
78
...
106
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
Results per page:
10
25
50
100
200