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
2024
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
Download
wine-devel
March 2020
----- 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
[email protected]
72 participants
969 discussions
Start a n
N
ew thread
[PATCH v2 1/2] ddraw/tests: Add more managed texture tests.
by Akihiro Sagawa
In v2, add render target tests. Signed-off-by: Akihiro Sagawa <sagawa.aki(a)gmail.com> --- dlls/ddraw/tests/ddraw7.c | 73 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 2 deletions(-)
4 years, 1 month
3
2
0
0
[PATCH 3/6] adsldp: Initialize also pADsValues->dwType field.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/adsldp/adsldp.c | 5 +++++ dlls/adsldp/tests/ldap.c | 2 ++ 2 files changed, 7 insertions(+) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 8af7a59632..d2b43977e3 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -1345,6 +1345,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex for (i = 0; i < count; i++) { TRACE("=> %s\n", debugstr_w(values[i])); + col->pADsValues[i].dwType = type; col->pADsValues[i].u.CaseIgnoreString = values[i]; } @@ -1371,6 +1372,8 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex for (i = 0; i < count; i++) { + col->pADsValues[i].dwType = type; + if (wcsicmp(values[i], L"TRUE")) col->pADsValues[i].u.Boolean = 1; else if (wcsicmp(values[i], L"FALSE")) @@ -1436,6 +1439,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex for (i = 0; i < count; i++) { TRACE("=> %s\n", debugstr_an(values[i]->bv_val, values[i]->bv_len)); + col->pADsValues[i].dwType = type; col->pADsValues[i].u.OctetString.dwLength = values[i]->bv_len; col->pADsValues[i].u.OctetString.lpValue = (BYTE *)values[i]->bv_val; } @@ -1489,6 +1493,7 @@ static HRESULT WINAPI search_GetColumn(IDirectorySearch *iface, ADS_SEARCH_HANDL wcscat(col->pADsValues[0].u.CaseIgnoreString, ldap->host); wcscat(col->pADsValues[0].u.CaseIgnoreString, L"/"); if (dn) wcscat(col->pADsValues[0].u.CaseIgnoreString, dn); + col->pADsValues[0].dwType = ADSTYPE_CASE_IGNORE_STRING; col->dwADsType = ADSTYPE_CASE_IGNORE_STRING; col->dwNumValues = 1; col->pszAttrName = strdupW(name); diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c index 3c1d47755d..120e77053a 100644 --- a/dlls/adsldp/tests/ldap.c +++ b/dlls/adsldp/tests/ldap.c @@ -271,6 +271,8 @@ static void do_search(const struct search *s) for (i = 0; i < col.dwNumValues; i++) { + ok(col.pADsValues[i].dwType == col.dwADsType, "%u: got %d for %s\n", i, col.pADsValues[i].dwType, wine_dbgstr_w(name)); + ok(res->values[i] != NULL, "expected to have more values for %s\n", wine_dbgstr_w(name)); if (!res->values[i]) break; -- 2.25.1
4 years, 1 month
2
1
0
0
[PATCH 1/6] adsldp: Blacklist serverless and rootDSE connections in QueryInterface(&IID_IDirectorySearch).
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/adsldp/adsldp.c | 14 +++----------- dlls/adsldp/tests/ldap.c | 6 ++++-- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index 5ab7948b1f..e0a14f2c70 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -437,6 +437,9 @@ static HRESULT WINAPI ldapns_QueryInterface(IADs *iface, REFIID riid, void **obj if (IsEqualGUID(riid, &IID_IDirectorySearch)) { + if (!ldap->ld || (ldap->object && !wcsicmp(ldap->object, L"rootDSE"))) + return E_NOINTERFACE; + IADs_AddRef(iface); *obj = &ldap->IDirectorySearch_iface; return S_OK; @@ -1167,8 +1170,6 @@ static HRESULT WINAPI search_ExecuteSearch(IDirectorySearch *iface, LPWSTR filte TRACE("%p,%s,%p,%u,%p\n", iface, debugstr_w(filter), names, count, res); - if (!ldap->ld) return E_NOTIMPL; - if (!res) return E_ADS_BAD_PARAMETER; ldap_ctx = heap_alloc_zero(sizeof(*ldap_ctx)); @@ -1217,13 +1218,10 @@ static HRESULT WINAPI search_AbandonSearch(IDirectorySearch *iface, ADS_SEARCH_H static HRESULT WINAPI search_GetFirstRow(IDirectorySearch *iface, ADS_SEARCH_HANDLE res) { - LDAP_namespace *ldap = impl_from_IDirectorySearch(iface); struct ldap_search_context *ldap_ctx = res; TRACE("%p,%p\n", iface, res); - if (!ldap->ld) return E_NOTIMPL; - if (!res) return E_ADS_BAD_PARAMETER; ldap_ctx->entry = NULL; @@ -1238,8 +1236,6 @@ static HRESULT WINAPI search_GetNextRow(IDirectorySearch *iface, ADS_SEARCH_HAND TRACE("%p,%p\n", iface, res); - if (!ldap->ld) return E_NOTIMPL; - if (!res) return E_ADS_BAD_PARAMETER; if (!ldap_ctx->entry) @@ -1283,8 +1279,6 @@ static HRESULT WINAPI search_GetNextColumnName(IDirectorySearch *iface, ADS_SEAR TRACE("%p,%p,%p\n", iface, res, name); - if (!ldap->ld) return E_NOTIMPL; - if (!name || !ldap_ctx || !ldap_ctx->entry) return E_ADS_BAD_PARAMETER; if (!ldap_ctx->ber) @@ -1393,8 +1387,6 @@ static HRESULT WINAPI search_GetColumn(IDirectorySearch *iface, ADS_SEARCH_HANDL TRACE("%p,%p,%s,%p\n", iface, res, debugstr_w(name), col); - if (!ldap->ld) return E_NOTIMPL; - if (!res || !name || !ldap_ctx->entry) return E_ADS_BAD_PARAMETER; if (!wcsicmp(name, L"ADsPath")) diff --git a/dlls/adsldp/tests/ldap.c b/dlls/adsldp/tests/ldap.c index b3cb489d58..3c1d47755d 100644 --- a/dlls/adsldp/tests/ldap.c +++ b/dlls/adsldp/tests/ldap.c @@ -344,8 +344,10 @@ static void test_DirectorySearch(void) ADS_SEARCH_COLUMN col; LPWSTR name; + hr = ADsGetObject(L"LDAP:", &IID_IDirectorySearch, (void **)&ds); + ok(hr == E_NOINTERFACE, "got %#x\n", hr); + hr = ADsGetObject(L"
LDAP://ldap.forumsys.com/rootDSE
", &IID_IDirectorySearch, (void **)&ds); -todo_wine ok(hr == E_NOINTERFACE, "got %#x\n", hr); hr = ADsGetObject(L"
LDAP://ldap.forumsys.com
", &IID_IDirectorySearch, (void **)&ds); @@ -439,7 +441,7 @@ todo_wine memset(&col, 0x55, sizeof(col)); hr = IDirectorySearch_GetColumn(ds, sh, (WCHAR *)L"deadbeef", &col); ok(hr == E_ADS_COLUMN_NOT_SET, "got %#x\n", hr); - ok(!col.pszAttrName, "got %p\n", col.pszAttrName); + ok(!col.pszAttrName || broken(col.pszAttrName != NULL) /* XP */, "got %p\n", col.pszAttrName); ok(col.dwADsType == ADSTYPE_INVALID || broken(col.dwADsType != ADSTYPE_INVALID) /* XP */, "got %d\n", col.dwADsType); ok(!col.pADsValues, "got %p\n", col.pADsValues); ok(!col.dwNumValues, "got %u\n", col.dwNumValues); -- 2.25.1
4 years, 1 month
2
1
0
0
[PATCH 5/6] adsldp: Sort the attribute types array.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/adsldp/adsldp.c | 16 +++++---- dlls/adsldp/adsldp_private.h | 4 +-- dlls/adsldp/schema.c | 70 +++++++++++++++++++++++++++++++----- 3 files changed, 73 insertions(+), 17 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index d2b43977e3..66fde6b7b6 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -391,7 +391,7 @@ typedef struct ULONG attrs_count, attrs_count_allocated; struct ldap_attribute *attrs; struct attribute_type *at; - ULONG at_count; + ULONG at_single_count, at_multiple_count; struct { ADS_SCOPEENUM scope; @@ -484,7 +484,7 @@ static ULONG WINAPI ldapns_Release(IADs *iface) SysFreeString(ldap->host); SysFreeString(ldap->object); free_attributes(ldap); - free_attribute_types(ldap->at, ldap->at_count); + free_attribute_types(ldap->at, ldap->at_single_count + ldap->at_multiple_count); heap_free(ldap); } @@ -943,7 +943,7 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B IADs *ads; LDAP *ld = NULL; HRESULT hr; - ULONG err, at_count = 0; + ULONG err, at_single_count = 0, at_multiple_count = 0; struct attribute_type *at = NULL; TRACE("%p,%s,%s,%p,%08x,%p\n", iface, debugstr_w(path), debugstr_w(user), password, flags, obj); @@ -1043,7 +1043,7 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B } } - at = load_schema(ld, &at_count); + at = load_schema(ld, &at_single_count, &at_multiple_count); } hr = LDAPNamespace_create(&IID_IADs, (void **)&ads); @@ -1055,7 +1055,8 @@ static HRESULT WINAPI openobj_OpenDSObject(IADsOpenDSObject *iface, BSTR path, B ldap->port = port; ldap->object = object; ldap->at = at; - ldap->at_count = at_count; + ldap->at_single_count = at_single_count; + ldap->at_multiple_count = at_multiple_count; hr = IADs_QueryInterface(ads, &IID_IDispatch, (void **)obj); IADs_Release(ads); return hr; @@ -1314,7 +1315,7 @@ static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_contex ADSTYPEENUM type; DWORD i, count; - type = get_schema_type(name, ldap->at, ldap->at_count); + type = get_schema_type(name, ldap->at, ldap->at_single_count, ldap->at_multiple_count); TRACE("%s => type %d\n", debugstr_w(name), type); switch (type) @@ -1577,7 +1578,8 @@ static HRESULT LDAPNamespace_create(REFIID riid, void **obj) ldap->attrs = NULL; ldap->search.scope = ADS_SCOPE_SUBTREE; ldap->at = NULL; - ldap->at_count = 0; + ldap->at_single_count = 0; + ldap->at_multiple_count = 0; hr = IADs_QueryInterface(&ldap->IADs_iface, riid, obj); IADs_Release(&ldap->IADs_iface); diff --git a/dlls/adsldp/adsldp_private.h b/dlls/adsldp/adsldp_private.h index a0d3a977a2..ea3d247dee 100644 --- a/dlls/adsldp/adsldp_private.h +++ b/dlls/adsldp/adsldp_private.h @@ -56,8 +56,8 @@ struct attribute_type }; DWORD map_ldap_error(DWORD) DECLSPEC_HIDDEN; -struct attribute_type *load_schema(LDAP *ld, ULONG *) DECLSPEC_HIDDEN; -ADSTYPEENUM get_schema_type(const WCHAR *, const struct attribute_type *, ULONG) DECLSPEC_HIDDEN; +struct attribute_type *load_schema(LDAP *ld, ULONG *, ULONG *) DECLSPEC_HIDDEN; +ADSTYPEENUM get_schema_type(const WCHAR *, const struct attribute_type *, ULONG, ULONG) DECLSPEC_HIDDEN; void free_attribute_types(struct attribute_type *, ULONG) DECLSPEC_HIDDEN; #endif diff --git a/dlls/adsldp/schema.c b/dlls/adsldp/schema.c index e91f817fc9..45c60c3711 100644 --- a/dlls/adsldp/schema.c +++ b/dlls/adsldp/schema.c @@ -30,11 +30,41 @@ WINE_DEFAULT_DEBUG_CHANNEL(adsldp); -static const struct attribute_type *find_schema_type(const WCHAR *name, const struct attribute_type *at, ULONG count) +static const struct attribute_type *find_schema_type_sorted(const WCHAR *name, const struct attribute_type *at, ULONG count) { + int idx, min, max, res; + + if (!count) return NULL; + + min = 0; + max = count - 1; + + while (min <= max) + { + idx = (min + max) / 2; + res = wcsicmp(name, at[idx].name); + if (!res) return &at[idx]; + if (res > 0) min = idx + 1; + else max = idx - 1; + } + + return NULL; +} + + +static const struct attribute_type *find_schema_type(const WCHAR *name, const struct attribute_type *at, ULONG single, ULONG multiple) +{ + const struct attribute_type *found; ULONG i, n, off; - for (i = 0; i < count; i++) + /* Perform binary search within definitions with single name */ + found = find_schema_type_sorted(name, at, single); + if (found) return found; + + /* Perform linear search within definitions with multiple names */ + at += single; + + for (i = 0; i < multiple; i++) { off = 0; @@ -45,15 +75,16 @@ static const struct attribute_type *find_schema_type(const WCHAR *name, const st } } + FIXME("%s not found\n", debugstr_w(name)); return NULL; } /* RFC 4517 */ -ADSTYPEENUM get_schema_type(const WCHAR *name, const struct attribute_type *at, ULONG at_count) +ADSTYPEENUM get_schema_type(const WCHAR *name, const struct attribute_type *at, ULONG single, ULONG multiple) { const struct attribute_type *type; - type = find_schema_type(name, at, at_count); + type = find_schema_type(name, at, single, multiple); if (!type || !type->syntax) return ADSTYPE_CASE_IGNORE_STRING; if (!wcscmp(type->syntax, L"1.3.6.1.4.1.1466.115.121.1.7")) @@ -300,16 +331,29 @@ static BOOL parse_attribute_type(WCHAR *str, struct attribute_type *at) return FALSE; } -struct attribute_type *load_schema(LDAP *ld, ULONG *at_count) +static int at_cmp(const void *a1, const void *a2) +{ + const struct attribute_type *at1 = a1; + const struct attribute_type *at2 = a2; + + if (at1->name_count == 1 && at2->name_count == 1) + return wcsicmp(at1->name, at2->name); + + /* put definitions with multiple names at the end */ + return at1->name_count - at2->name_count; +} + +struct attribute_type *load_schema(LDAP *ld, ULONG *at_single_count, ULONG *at_multiple_count) { WCHAR *subschema[] = { (WCHAR *)L"subschemaSubentry", NULL }; WCHAR *attribute_types[] = { (WCHAR *)L"attributeTypes", NULL }; - ULONG err, count; + ULONG err, count, multiple_count; LDAPMessage *res, *entry; WCHAR **schema = NULL; struct attribute_type *at = NULL; - *at_count = 0; + *at_single_count = 0; + *at_multiple_count = 0; err = ldap_search_sW(ld, NULL, LDAP_SCOPE_BASE, (WCHAR *)L"(objectClass=*)", subschema, FALSE, &res); if (err != LDAP_SUCCESS) @@ -334,6 +378,7 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_count) } count = 0; + multiple_count = 0; entry = ldap_first_entry(ld, res); if (entry) @@ -367,6 +412,9 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_count) TRACE("oid %s, name %s, name_count %u, syntax %s, single-value %d\n", debugstr_w(at[count].oid), debugstr_w(at[count].name), at[count].name_count, debugstr_w(at[count].syntax), at[count].single_value); + if (at[count].name_count > 1) + multiple_count++; + count++; } @@ -376,7 +424,13 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_count) exit: ldap_msgfree(res); - if (at) *at_count = count; + if (at) + { + *at_single_count = count - multiple_count; + *at_multiple_count = multiple_count; + + qsort(at, count, sizeof(at[0]), at_cmp); + } return at; } -- 2.25.1
4 years, 1 month
2
1
0
0
[PATCH 6/6] activeds: Add IADsPathname stubs.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/activeds/Makefile.in | 9 +- dlls/activeds/activeds.idl | 27 +++ dlls/activeds/activeds.spec | 2 +- dlls/activeds/pathname.c | 348 ++++++++++++++++++++++++++++++++++++ include/iads.idl | 24 +++ 5 files changed, 407 insertions(+), 3 deletions(-) create mode 100644 dlls/activeds/activeds.idl create mode 100644 dlls/activeds/pathname.c diff --git a/dlls/activeds/Makefile.in b/dlls/activeds/Makefile.in index 54f86d661e..e76db4f7bc 100644 --- a/dlls/activeds/Makefile.in +++ b/dlls/activeds/Makefile.in @@ -1,7 +1,12 @@ MODULE = activeds.dll IMPORTLIB = activeds -IMPORTS = advapi32 ole32 oleaut32 +IMPORTS = advapi32 ole32 oleaut32 uuid EXTRADLLFLAGS = -mno-cygwin -C_SRCS = activeds_main.c +C_SRCS = \ + activeds_main.c \ + pathname.c + +IDL_SRCS = \ + activeds.idl diff --git a/dlls/activeds/activeds.idl b/dlls/activeds/activeds.idl new file mode 100644 index 0000000000..561c47ce0e --- /dev/null +++ b/dlls/activeds/activeds.idl @@ -0,0 +1,27 @@ +/* + * Copyright 2020 Dmitry Timoshkov + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#pragma makedep register + +[ + helpstring("ADs LDAP Pathname Descriptor Object"), + progid("Pathname"), + uuid(080d0d78-f421-11d0-a36e-00c04fb950dc), + threading(both) +] +coclass Pathname { interface IADsPathname; } diff --git a/dlls/activeds/activeds.spec b/dlls/activeds/activeds.spec index 58bd479e40..9e50d32593 100644 --- a/dlls/activeds/activeds.spec +++ b/dlls/activeds/activeds.spec @@ -23,6 +23,6 @@ 27 stub ConvertSecDescriptorToVariant 28 stub ConvertSecurityDescriptorToSecDes #@ stub DllCanUnloadNow -#@ stub DllGetClassObject +@ stdcall -private DllGetClassObject(ptr ptr ptr) #@ stub DllRegisterServer #@ stub DllUnregisterServer diff --git a/dlls/activeds/pathname.c b/dlls/activeds/pathname.c new file mode 100644 index 0000000000..63b86ab778 --- /dev/null +++ b/dlls/activeds/pathname.c @@ -0,0 +1,348 @@ +/* + * Copyright 2020 Dmitry Timoshkov + * + * This file contains only stubs to get the printui.dll up and running + * activeds.dll is much much more than this + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "iads.h" + +#include "wine/heap.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(activeds); + +#include "initguid.h" +DEFINE_GUID(CLSID_Pathname,0x080d0d78,0xf421,0x11d0,0xa3,0x6e,0x00,0xc0,0x4f,0xb9,0x50,0xdc); + +typedef struct +{ + IADsPathname IADsPathname_iface; + LONG ref; +} Pathname; + +static inline Pathname *impl_from_IADsPathname(IADsPathname *iface) +{ + return CONTAINING_RECORD(iface, Pathname, IADsPathname_iface); +} + +static HRESULT WINAPI path_QueryInterface(IADsPathname *iface, REFIID riid, void **obj) +{ + TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj); + + if (!riid || !obj) return E_INVALIDARG; + + if (IsEqualGUID(riid, &IID_IUnknown) || + IsEqualGUID(riid, &IID_IDispatch) || + IsEqualGUID(riid, &IID_IADsPathname)) + { + IADsPathname_AddRef(iface); + *obj = iface; + return S_OK; + } + + FIXME("interface %s is not implemented\n", debugstr_guid(riid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI path_AddRef(IADsPathname *iface) +{ + Pathname *path = impl_from_IADsPathname(iface); + return InterlockedIncrement(&path->ref); +} + +static ULONG WINAPI path_Release(IADsPathname *iface) +{ + Pathname *path = impl_from_IADsPathname(iface); + LONG ref = InterlockedDecrement(&path->ref); + + if (!ref) + { + TRACE("destroying %p\n", iface); + heap_free(path); + } + + return ref; +} + +static HRESULT WINAPI path_GetTypeInfoCount(IADsPathname *iface, UINT *count) +{ + FIXME("%p,%p: stub\n", iface, count); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_GetTypeInfo(IADsPathname *iface, UINT index, LCID lcid, ITypeInfo **info) +{ + FIXME("%p,%u,%#x,%p: stub\n", iface, index, lcid, info); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_GetIDsOfNames(IADsPathname *iface, REFIID riid, LPOLESTR *names, + UINT count, LCID lcid, DISPID *dispid) +{ + FIXME("%p,%s,%p,%u,%u,%p: stub\n", iface, debugstr_guid(riid), names, count, lcid, dispid); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_Invoke(IADsPathname *iface, DISPID dispid, REFIID riid, LCID lcid, WORD flags, + DISPPARAMS *params, VARIANT *result, EXCEPINFO *excepinfo, UINT *argerr) +{ + FIXME("%p,%d,%s,%04x,%04x,%p,%p,%p,%p: stub\n", iface, dispid, debugstr_guid(riid), lcid, flags, + params, result, excepinfo, argerr); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_Set(IADsPathname *iface, BSTR path, LONG type) +{ + FIXME("%p,%s,%d: stub\n", iface, debugstr_w(path), type); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_SetDisplayType(IADsPathname *iface, LONG type) +{ + FIXME("%p,%d: stub\n", iface, type); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_Retrieve(IADsPathname *iface, LONG type, BSTR *path) +{ + FIXME("%p,%d,%p: stub\n", iface, type, path); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_GetNumElements(IADsPathname *iface, LONG *count) +{ + FIXME("%p,%p: stub\n", iface, count); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_GetElement(IADsPathname *iface, LONG index, BSTR *element) +{ + FIXME("%p,%d,%p: stub\n", iface, index, element); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_AddLeafElement(IADsPathname *iface, BSTR element) +{ + FIXME("%p,%s: stub\n", iface, debugstr_w(element)); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_RemoveLeafElement(IADsPathname *iface) +{ + FIXME("%p: stub\n", iface); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_CopyPath(IADsPathname *iface, IDispatch **path) +{ + FIXME("%p,%p: stub\n", iface, path); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_GetEscapedElement(IADsPathname *iface, LONG reserved, BSTR element, BSTR *str) +{ + FIXME("%p,%d,%s,%p: stub\n", iface, reserved, debugstr_w(element), str); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_get_EscapedMode(IADsPathname *iface, LONG *mode) +{ + FIXME("%p,%p: stub\n", iface, mode); + return E_NOTIMPL; +} + +static HRESULT WINAPI path_put_EscapedMode(IADsPathname *iface, LONG mode) +{ + FIXME("%p,%d: stub\n", iface, mode); + return E_NOTIMPL; +} + +static const IADsPathnameVtbl IADsPathname_vtbl = +{ + path_QueryInterface, + path_AddRef, + path_Release, + path_GetTypeInfoCount, + path_GetTypeInfo, + path_GetIDsOfNames, + path_Invoke, + path_Set, + path_SetDisplayType, + path_Retrieve, + path_GetNumElements, + path_GetElement, + path_AddLeafElement, + path_RemoveLeafElement, + path_CopyPath, + path_GetEscapedElement, + path_get_EscapedMode, + path_put_EscapedMode +}; + +static HRESULT Pathname_create(REFIID riid, void **obj) +{ + Pathname *path; + HRESULT hr; + + path = heap_alloc(sizeof(*path)); + if (!path) return E_OUTOFMEMORY; + + path->IADsPathname_iface.lpVtbl = &IADsPathname_vtbl; + path->ref = 1; + + hr = IADsPathname_QueryInterface(&path->IADsPathname_iface, riid, obj); + IADsPathname_Release(&path->IADsPathname_iface); + + return hr; +} + +static const struct class_info +{ + const CLSID *clsid; + HRESULT (*constructor)(REFIID, void **); +} class_info[] = +{ + { &CLSID_Pathname, Pathname_create } +}; + +typedef struct +{ + IClassFactory IClassFactory_iface; + LONG ref; + const struct class_info *info; +} class_factory; + +static inline class_factory *impl_from_IClassFactory(IClassFactory *iface) +{ + return CONTAINING_RECORD(iface, class_factory, IClassFactory_iface); +} + +static HRESULT WINAPI factory_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *obj) +{ + TRACE("%p,%s,%p\n", iface, debugstr_guid(riid), obj); + + if (!riid || !obj) return E_INVALIDARG; + + if (IsEqualIID(riid, &IID_IUnknown) || + IsEqualIID(riid, &IID_IClassFactory)) + { + IClassFactory_AddRef(iface); + *obj = iface; + return S_OK; + } + + *obj = NULL; + FIXME("interface %s is not implemented\n", debugstr_guid(riid)); + return E_NOINTERFACE; +} + +static ULONG WINAPI factory_AddRef(IClassFactory *iface) +{ + class_factory *factory = impl_from_IClassFactory(iface); + ULONG ref = InterlockedIncrement(&factory->ref); + + TRACE("(%p) ref %u\n", iface, ref); + + return ref; +} + +static ULONG WINAPI factory_Release(IClassFactory *iface) +{ + class_factory *factory = impl_from_IClassFactory(iface); + ULONG ref = InterlockedDecrement(&factory->ref); + + TRACE("(%p) ref %u\n", iface, ref); + + if (!ref) + heap_free(factory); + + return ref; +} + +static HRESULT WINAPI factory_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **obj) +{ + class_factory *factory = impl_from_IClassFactory(iface); + + TRACE("%p,%s,%p\n", outer, debugstr_guid(riid), obj); + + if (!riid || !obj) return E_INVALIDARG; + + *obj = NULL; + if (outer) return CLASS_E_NOAGGREGATION; + + return factory->info->constructor(riid, obj); +} + +static HRESULT WINAPI factory_LockServer(IClassFactory *iface, BOOL lock) +{ + FIXME("%p,%d: stub\n", iface, lock); + return S_OK; +} + +static const struct IClassFactoryVtbl factory_vtbl = +{ + factory_QueryInterface, + factory_AddRef, + factory_Release, + factory_CreateInstance, + factory_LockServer +}; + +static HRESULT factory_constructor(const struct class_info *info, REFIID riid, void **obj) +{ + class_factory *factory; + HRESULT hr; + + factory = heap_alloc(sizeof(*factory)); + if (!factory) return E_OUTOFMEMORY; + + factory->IClassFactory_iface.lpVtbl = &factory_vtbl; + factory->ref = 1; + factory->info = info; + + hr = IClassFactory_QueryInterface(&factory->IClassFactory_iface, riid, obj); + IClassFactory_Release(&factory->IClassFactory_iface); + + return hr; +} + +HRESULT WINAPI DllGetClassObject(REFCLSID clsid, REFIID iid, LPVOID *obj) +{ + int i; + + TRACE("%s,%s,%p\n", debugstr_guid(clsid), debugstr_guid(iid), obj); + + if (!clsid || !iid || !obj) return E_INVALIDARG; + + *obj = NULL; + + for (i = 0; i < ARRAY_SIZE(class_info); i++) + { + if (IsEqualCLSID(class_info[i].clsid, clsid)) + return factory_constructor(&class_info[i], iid, obj); + } + + FIXME("class %s/%s is not implemented\n", debugstr_guid(clsid), debugstr_guid(iid)); + return CLASS_E_CLASSNOTAVAILABLE; +} diff --git a/include/iads.idl b/include/iads.idl index 6bb63afafb..c9d1687524 100644 --- a/include/iads.idl +++ b/include/iads.idl @@ -813,6 +813,30 @@ interface IADsOpenDSObject : IDispatch HRESULT OpenDSObject([in] BSTR path, [in] BSTR user, [in] BSTR password, [in] long reserved, [out,retval] IDispatch **obj); } +/***************************************************************************** + * IADsPathname interface + */ +[ + odl, + uuid(d592aed4-f420-11d0-a36e-00c04fb950dc), + dual, + oleautomation +] +interface IADsPathname : IDispatch +{ + HRESULT Set(BSTR path, long type); + HRESULT SetDisplayType(long type); + HRESULT Retrieve(long type, BSTR *path); + HRESULT GetNumElements(long *count); + HRESULT GetElement(long index, BSTR *element); + HRESULT AddLeafElement(BSTR element); + HRESULT RemoveLeafElement(void); + HRESULT CopyPath(IDispatch **path); + HRESULT GetEscapedElement(long reserved, BSTR element, BSTR *str); + HRESULT get_EscapedMode(long *mode); + HRESULT put_EscapedMode(long mode); +} + /***************************************************************************** * IADsADSystemInfo interface */ -- 2.25.1
4 years, 1 month
1
0
0
0
[PATCH 4/6] adsldp: Ignore attribute definitions without NAME.
by Dmitry Timoshkov
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/adsldp/schema.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/adsldp/schema.c b/dlls/adsldp/schema.c index bff754be7a..e91f817fc9 100644 --- a/dlls/adsldp/schema.c +++ b/dlls/adsldp/schema.c @@ -36,8 +36,6 @@ static const struct attribute_type *find_schema_type(const WCHAR *name, const st for (i = 0; i < count; i++) { - if (!at[i].name) continue; - off = 0; for (n = 0; n < at[i].name_count; n++) @@ -360,6 +358,12 @@ struct attribute_type *load_schema(LDAP *ld, ULONG *at_count) continue; } + if (!at[count].name) + { + free_attribute_type(&at[count]); + continue; + } + TRACE("oid %s, name %s, name_count %u, syntax %s, single-value %d\n", debugstr_w(at[count].oid), debugstr_w(at[count].name), at[count].name_count, debugstr_w(at[count].syntax), at[count].single_value); -- 2.25.1
4 years, 1 month
1
0
0
0
[PATCH 2/6] adsldp: Store original LDAP values pointer in hReserved.
by Dmitry Timoshkov
AD Explorer depends on this. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> --- dlls/adsldp/adsldp.c | 169 ++++++++++++++++++++++++++++++------------- 1 file changed, 120 insertions(+), 49 deletions(-) diff --git a/dlls/adsldp/adsldp.c b/dlls/adsldp/adsldp.c index e0a14f2c70..8af7a59632 100644 --- a/dlls/adsldp/adsldp.c +++ b/dlls/adsldp/adsldp.c @@ -1308,65 +1308,141 @@ static HRESULT WINAPI search_GetNextColumnName(IDirectorySearch *iface, ADS_SEAR return S_ADS_NOMORE_COLUMNS; } -static HRESULT add_column_values(LDAP_namespace *ldap, ADS_SEARCH_COLUMN *col, - const WCHAR *name, struct berval **values, DWORD count) +static HRESULT add_column_values(LDAP_namespace *ldap, struct ldap_search_context *ldap_ctx, + LPWSTR name, ADS_SEARCH_COLUMN *col) { ADSTYPEENUM type; - DWORD i; + DWORD i, count; type = get_schema_type(name, ldap->at, ldap->at_count); + TRACE("%s => type %d\n", debugstr_w(name), type); - col->pADsValues = heap_alloc(count * sizeof(col->pADsValues[0])); - if (!col->pADsValues) - return E_OUTOFMEMORY; + switch (type) + { + default: + FIXME("no special handling for type %d\n", type); + /* fall through */ + case ADSTYPE_DN_STRING: + case ADSTYPE_CASE_EXACT_STRING: + case ADSTYPE_CASE_IGNORE_STRING: + case ADSTYPE_PRINTABLE_STRING: + { + WCHAR **values = ldap_get_valuesW(ldap->ld, ldap_ctx->entry, name); + if (!values) + { + memset(col, 0, sizeof(*col)); + return E_ADS_COLUMN_NOT_SET; + } + count = ldap_count_valuesW(values); - for (i = 0; i < count; i++) + col->pADsValues = heap_alloc(count * sizeof(col->pADsValues[0])); + if (!col->pADsValues) + { + ldap_value_freeW(values); + return E_OUTOFMEMORY; + } + + for (i = 0; i < count; i++) + { + TRACE("=> %s\n", debugstr_w(values[i])); + col->pADsValues[i].u.CaseIgnoreString = values[i]; + } + + col->hReserved = values; + break; + } + + case ADSTYPE_BOOLEAN: { - switch (type) + WCHAR **values = ldap_get_valuesW(ldap->ld, ldap_ctx->entry, name); + if (!values) { - default: - FIXME("no special handling for type %d\n", type); - /* fall through */ - case ADSTYPE_DN_STRING: - case ADSTYPE_CASE_EXACT_STRING: - case ADSTYPE_CASE_IGNORE_STRING: - case ADSTYPE_PRINTABLE_STRING: + memset(col, 0, sizeof(*col)); + return E_ADS_COLUMN_NOT_SET; + } + count = ldap_count_valuesW(values); + + col->pADsValues = heap_alloc(count * sizeof(col->pADsValues[0])); + if (!col->pADsValues) { - DWORD outlen; - TRACE("=> %s\n", debugstr_an(values[i]->bv_val, values[i]->bv_len)); - col->pADsValues[i].u.CaseIgnoreString = strnUtoW(values[i]->bv_val, values[i]->bv_len, &outlen); - if (!col->pADsValues[i].u.CaseIgnoreString) - { - heap_free(col->pADsValues); - return E_OUTOFMEMORY; - } - break; + ldap_value_freeW(values); + return E_OUTOFMEMORY; } - case ADSTYPE_BOOLEAN: - if (stricmp(values[i]->bv_val, "TRUE")) + for (i = 0; i < count; i++) + { + if (wcsicmp(values[i], L"TRUE")) col->pADsValues[i].u.Boolean = 1; - else if (stricmp(values[i]->bv_val, "FALSE")) + else if (wcsicmp(values[i], L"FALSE")) col->pADsValues[i].u.Boolean = 0; else { - FIXME("not recognized boolean value %s\n", debugstr_an(values[i]->bv_val, values[i]->bv_len)); + FIXME("not recognized boolean value %s\n", debugstr_w(values[i])); col->pADsValues[i].u.Boolean = 0; } TRACE("=> %d\n", col->pADsValues[i].u.Boolean); - break; + } - case ADSTYPE_INTEGER: - col->pADsValues[i].u.Integer = strtol(values[i]->bv_val, NULL, 10); - TRACE("%s => %d\n", debugstr_an(values[i]->bv_val, values[i]->bv_len), col->pADsValues[i].u.Integer); - break; + ldap_value_freeW(values); + col->hReserved = NULL; + break; + } + + case ADSTYPE_INTEGER: + { + WCHAR **values = ldap_get_valuesW(ldap->ld, ldap_ctx->entry, name); + if (!values) + { + memset(col, 0, sizeof(*col)); + return E_ADS_COLUMN_NOT_SET; + } + count = ldap_count_valuesW(values); + + col->pADsValues = heap_alloc(count * sizeof(col->pADsValues[0])); + if (!col->pADsValues) + { + ldap_value_freeW(values); + return E_OUTOFMEMORY; + } + + for (i = 0; i < count; i++) + { + col->pADsValues[i].u.Integer = wcstol(values[i], NULL, 10); + TRACE("%s => %d\n", debugstr_w(values[i]), col->pADsValues[i].u.Integer); + } - case ADSTYPE_OCTET_STRING: + ldap_value_freeW(values); + col->hReserved = NULL; + break; + } + + case ADSTYPE_OCTET_STRING: + { + struct berval **values = ldap_get_values_lenW(ldap->ld, ldap_ctx->entry, name);; + if (!values) + { + memset(col, 0, sizeof(*col)); + return E_ADS_COLUMN_NOT_SET; + } + count = ldap_count_values_len(values); + + col->pADsValues = heap_alloc(count * sizeof(col->pADsValues[0])); + if (!col->pADsValues) + { + ldap_value_free_len(values); + return E_OUTOFMEMORY; + } + + for (i = 0; i < count; i++) + { TRACE("=> %s\n", debugstr_an(values[i]->bv_val, values[i]->bv_len)); col->pADsValues[i].u.OctetString.dwLength = values[i]->bv_len; col->pADsValues[i].u.OctetString.lpValue = (BYTE *)values[i]->bv_val; - break; } + + col->hReserved = values; + break; + } } col->dwADsType = type; @@ -1382,7 +1458,6 @@ static HRESULT WINAPI search_GetColumn(IDirectorySearch *iface, ADS_SEARCH_HANDL LDAP_namespace *ldap = impl_from_IDirectorySearch(iface); struct ldap_search_context *ldap_ctx = res; HRESULT hr; - struct berval **values; ULONG count; TRACE("%p,%p,%s,%p\n", iface, res, debugstr_w(name), col); @@ -1417,6 +1492,7 @@ static HRESULT WINAPI search_GetColumn(IDirectorySearch *iface, ADS_SEARCH_HANDL col->dwADsType = ADSTYPE_CASE_IGNORE_STRING; col->dwNumValues = 1; col->pszAttrName = strdupW(name); + col->hReserved = NULL; TRACE("=> %s\n", debugstr_w(col->pADsValues[0].u.CaseIgnoreString)); hr = S_OK; @@ -1425,19 +1501,7 @@ exit: return hr; } - values = ldap_get_values_lenW(ldap->ld, ldap_ctx->entry, name); - if (!values) - { - memset(col, 0, sizeof(*col)); - return E_ADS_COLUMN_NOT_SET; - } - - count = ldap_count_values_len(values); - - hr = add_column_values(ldap, col, name, values, count); - ldap_value_free_len(values); - - return hr; + return add_column_values(ldap, ldap_ctx, name, col); } static HRESULT WINAPI search_FreeColumn(IDirectorySearch *iface, PADS_SEARCH_COLUMN col) @@ -1447,6 +1511,13 @@ static HRESULT WINAPI search_FreeColumn(IDirectorySearch *iface, PADS_SEARCH_COL if (!col) return E_ADS_BAD_PARAMETER; heap_free(col->pADsValues); + if (col->hReserved) + { + if (col->dwADsType == ADSTYPE_OCTET_STRING) + ldap_value_free_len(col->hReserved); + else + ldap_value_freeW(col->hReserved); + } return S_OK; } -- 2.25.1
4 years, 1 month
1
0
0
0
[PATCH 1/5] winedbg: Add _snscanf function to safely parse packets.
by Rémi Bernon
We don't build winedbg with msvcrt so it's not actually available but we can fake it instead. Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com> --- programs/winedbg/gdbproxy.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index 052e73b2ad69..ddd2c60e25ea 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -120,6 +120,21 @@ static struct be_process_io be_process_gdbproxy_io = * =============================================== * */ +static int _snscanf(char* src, size_t len, const char* format, ...) +{ + int n; + char c = src[len]; + va_list args; + + src[len] = '\0'; + va_start(args, format); + n = vsscanf(src, format, args); + va_end(args); + src[len] = c; + + return n; +} + static inline int hex_from0(char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; @@ -1201,8 +1216,7 @@ static enum packet_return packet_read_memory(struct gdb_context* gdbctx) SIZE_T r = 0; assert(gdbctx->in_trap); - /* FIXME:check in_packet_len for reading %p,%x */ - if (sscanf(gdbctx->in_packet, "%p,%x", &addr, &len) != 2) return packet_error; + if (_snscanf(gdbctx->in_packet, gdbctx->in_packet_len, "%p,%x", &addr, &len) != 2) return packet_error; if (len <= 0) return packet_error; TRACE("Read %u bytes at %p\n", len, addr); for (nread = 0; nread < len; nread += r, addr += r) @@ -1240,7 +1254,7 @@ static enum packet_return packet_write_memory(struct gdb_context* gdbctx) } *ptr++ = '\0'; - if (sscanf(gdbctx->in_packet, "%p,%x", &addr, &len) != 2) + if (_snscanf(gdbctx->in_packet, gdbctx->in_packet_len, "%p,%x", &addr, &len) != 2) { ERR("Failed to parse %s\n", debugstr_a(gdbctx->in_packet)); return packet_error; -- 2.26.0.rc2
4 years, 1 month
2
5
0
0
[PATCH 2/2] api-ms-win-crt-private-l1-1-0: Add cdecls for vs[fw]printf
by Myah Caron
Signed-off-by: Myah Caron <qsniyg(a)mail.com> --- .../api-ms-win-crt-private-l1-1-0.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec index 668b8c02fb..01f295f25f 100644 --- a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec +++ b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec @@ -150,7 +150,7 @@ @ stub _o___stdio_common_vfprintf_p @ stub _o___stdio_common_vfprintf_s @ stub _o___stdio_common_vfscanf -@ stub _o___stdio_common_vfwprintf +@ cdecl _o___stdio_common_vfwprintf(int64 ptr wstr ptr ptr) ucrtbase._o___stdio_common_vfwprintf @ stub _o___stdio_common_vfwprintf_p @ stub _o___stdio_common_vfwprintf_s @ stub _o___stdio_common_vfwscanf @@ -160,7 +160,7 @@ @ stub _o___stdio_common_vsprintf_p @ cdecl _o___stdio_common_vsprintf_s(int64 ptr long str ptr ptr) ucrtbase._o___stdio_common_vsprintf_s @ stub _o___stdio_common_vsscanf -@ stub _o___stdio_common_vswprintf +@ cdecl _o___stdio_common_vswprintf(int64 ptr long wstr ptr ptr) ucrtbase._o___stdio_common_vswprintf @ stub _o___stdio_common_vswprintf_p @ stub _o___stdio_common_vswprintf_s @ stub _o___stdio_common_vswscanf -- 2.25.1
4 years, 1 month
1
0
0
0
[PATCH 1/2] ucrtbase: Add cdecls for _o___stdio_common_vs[fw]printf
by Myah Caron
Signed-off-by: Myah Caron <qsniyg(a)mail.com> --- Needed by Mount & Blade II --- dlls/ucrtbase/ucrtbase.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index c4807128a1..1c039d0715 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -814,7 +814,7 @@ @ stub _o___stdio_common_vfprintf_p @ stub _o___stdio_common_vfprintf_s @ stub _o___stdio_common_vfscanf -@ stub _o___stdio_common_vfwprintf +@ cdecl _o___stdio_common_vfwprintf(int64 ptr wstr ptr ptr) MSVCRT__stdio_common_vfwprintf @ stub _o___stdio_common_vfwprintf_p @ stub _o___stdio_common_vfwprintf_s @ stub _o___stdio_common_vfwscanf @@ -824,7 +824,7 @@ @ stub _o___stdio_common_vsprintf_p @ cdecl _o___stdio_common_vsprintf_s(int64 ptr long str ptr ptr) MSVCRT__stdio_common_vsprintf_s @ stub _o___stdio_common_vsscanf -@ stub _o___stdio_common_vswprintf +@ cdecl _o___stdio_common_vswprintf(int64 ptr long wstr ptr ptr) MSVCRT__stdio_common_vswprintf @ stub _o___stdio_common_vswprintf_p @ stub _o___stdio_common_vswprintf_s @ stub _o___stdio_common_vswscanf -- 2.25.1
4 years, 1 month
1
0
0
0
← Newer
1
...
4
5
6
7
8
9
10
...
97
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
Results per page:
10
25
50
100
200