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
February 2008
----- 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
3 participants
999 discussions
Start a n
N
ew thread
Juan Lang : crypt32: Vista doesn't actually add duplicate usage identifiers ; fix tests and change Wine to match.
by Alexandre Julliard
16 Feb '08
16 Feb '08
Module: wine Branch: master Commit: b04c4aa6ff7606895a11dbab043a83bad2c3b916 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b04c4aa6ff7606895a11dbab0…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Feb 14 10:54:51 2008 -0800 crypt32: Vista doesn't actually add duplicate usage identifiers; fix tests and change Wine to match. --- dlls/crypt32/cert.c | 48 +++++++++++++++++++++++++++++--------------- dlls/crypt32/tests/cert.c | 8 ++++-- 2 files changed, 36 insertions(+), 20 deletions(-) diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c index d747574..84780cb 100644 --- a/dlls/crypt32/cert.c +++ b/dlls/crypt32/cert.c @@ -1902,29 +1902,43 @@ BOOL WINAPI CertAddEnhancedKeyUsageIdentifier(PCCERT_CONTEXT pCertContext, CERT_FIND_PROP_ONLY_ENHKEY_USAGE_FLAG, usage, &size); if (ret) { - PCERT_ENHKEY_USAGE newUsage = CryptMemAlloc(size + - sizeof(LPSTR) + strlen(pszUsageIdentifier) + 1); + DWORD i; + BOOL exists = FALSE; - if (newUsage) + /* Make sure usage doesn't already exist */ + for (i = 0; !exists && i < usage->cUsageIdentifier; i++) { - LPSTR nextOID; - DWORD i; + if (!strcmp(usage->rgpszUsageIdentifier[i], + pszUsageIdentifier)) + exists = TRUE; + } + if (!exists) + { + PCERT_ENHKEY_USAGE newUsage = CryptMemAlloc(size + + sizeof(LPSTR) + strlen(pszUsageIdentifier) + 1); - newUsage->rgpszUsageIdentifier = - (LPSTR *)((LPBYTE)newUsage + sizeof(CERT_ENHKEY_USAGE)); - nextOID = (LPSTR)((LPBYTE)newUsage->rgpszUsageIdentifier + - (usage->cUsageIdentifier + 1) * sizeof(LPSTR)); - for (i = 0; i < usage->cUsageIdentifier; i++) + if (newUsage) { + LPSTR nextOID; + + newUsage->rgpszUsageIdentifier = (LPSTR *) + ((LPBYTE)newUsage + sizeof(CERT_ENHKEY_USAGE)); + nextOID = (LPSTR)((LPBYTE)newUsage->rgpszUsageIdentifier + + (usage->cUsageIdentifier + 1) * sizeof(LPSTR)); + for (i = 0; i < usage->cUsageIdentifier; i++) + { + newUsage->rgpszUsageIdentifier[i] = nextOID; + strcpy(nextOID, usage->rgpszUsageIdentifier[i]); + nextOID += strlen(nextOID) + 1; + } newUsage->rgpszUsageIdentifier[i] = nextOID; - strcpy(nextOID, usage->rgpszUsageIdentifier[i]); - nextOID += strlen(nextOID) + 1; + strcpy(nextOID, pszUsageIdentifier); + newUsage->cUsageIdentifier = i + 1; + ret = CertSetEnhancedKeyUsage(pCertContext, newUsage); + CryptMemFree(newUsage); } - newUsage->rgpszUsageIdentifier[i] = nextOID; - strcpy(nextOID, pszUsageIdentifier); - newUsage->cUsageIdentifier = i + 1; - ret = CertSetEnhancedKeyUsage(pCertContext, newUsage); - CryptMemFree(newUsage); + else + ret = FALSE; } } CryptMemFree(usage); diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 37a709b..0ab9334 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -2053,7 +2053,9 @@ static void testKeyUsage(void) if (pUsage->cUsageIdentifier) ok(!strcmp(pUsage->rgpszUsageIdentifier[0], oid), "Expected %s, got %s\n", oid, pUsage->rgpszUsageIdentifier[0]); - /* Yep, I can re-add the same usage identifier */ + /* Re-adding the same usage identifier succeeds, though it only adds + * a duplicate usage identifier on versions prior to Vista + */ ret = CertAddEnhancedKeyUsageIdentifier(context, oid); ok(ret, "CertAddEnhancedKeyUsageIdentifier failed: %08x\n", GetLastError()); @@ -2061,8 +2063,8 @@ static void testKeyUsage(void) ret = CertGetEnhancedKeyUsage(context, 0, pUsage, &size); ok(ret && GetLastError() == 0, "CertGetEnhancedKeyUsage failed: %08x\n", GetLastError()); - ok(pUsage->cUsageIdentifier == 2, "Expected 2 identifiers, got %d\n", - pUsage->cUsageIdentifier); + ok(pUsage->cUsageIdentifier == 1 || pUsage->cUsageIdentifier == 2, + "Expected 1 or 2 identifiers, got %d\n", pUsage->cUsageIdentifier); if (pUsage->cUsageIdentifier) ok(!strcmp(pUsage->rgpszUsageIdentifier[0], oid), "Expected %s, got %s\n", oid, pUsage->rgpszUsageIdentifier[0]);
1
0
0
0
Juan Lang : crypt32: Allow some last errors set by Vista.
by Alexandre Julliard
16 Feb '08
16 Feb '08
Module: wine Branch: master Commit: b579eac22f686c27ab41a7db84d7f62dbd67b6f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b579eac22f686c27ab41a7db8…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Feb 14 10:36:16 2008 -0800 crypt32: Allow some last errors set by Vista. --- dlls/crypt32/tests/cert.c | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index 5aa20ae..37a709b 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -1552,12 +1552,14 @@ static void testSignCert(HCRYPTPROV csp, const CRYPT_DATA_BLOB *toBeSigned, algoID.pszObjId = (LPSTR)sigOID; ret = CryptSignCertificate(0, 0, 0, toBeSigned->pbData, toBeSigned->cbData, &algoID, NULL, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || NTE_BAD_ALGID), + "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", + GetLastError()); ret = CryptSignCertificate(0, AT_SIGNATURE, 0, toBeSigned->pbData, toBeSigned->cbData, &algoID, NULL, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || NTE_BAD_ALGID), + "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", + GetLastError()); /* No keys exist in the new CSP yet.. */ ret = CryptSignCertificate(csp, AT_SIGNATURE, 0, toBeSigned->pbData, @@ -1767,8 +1769,9 @@ static void testSignAndEncodeCert(void) algID.pszObjId = oid_rsa_md5rsa; ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, NULL, &size); - ok(!ret && GetLastError() == ERROR_INVALID_PARAMETER, - "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == ERROR_INVALID_PARAMETER || NTE_BAD_ALGID), + "Expected ERROR_INVALID_PARAMETER or NTE_BAD_ALGID, got %08x\n", + GetLastError()); algID.pszObjId = oid_rsa_md5; ret = CryptSignAndEncodeCertificate(0, 0, X509_ASN_ENCODING, X509_CERT_TO_BE_SIGNED, &info, &algID, NULL, NULL, &size);
1
0
0
0
Juan Lang : crypt32: Fix a test failure on Vista, and make Wine match the newer (and saner) behavior.
by Alexandre Julliard
16 Feb '08
16 Feb '08
Module: wine Branch: master Commit: 348261e6ab96f633bb1d287dcac669bc2876d701 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=348261e6ab96f633bb1d287dc…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Feb 14 10:33:09 2008 -0800 crypt32: Fix a test failure on Vista, and make Wine match the newer (and saner) behavior. --- dlls/crypt32/store.c | 7 +------ dlls/crypt32/tests/cert.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/dlls/crypt32/store.c b/dlls/crypt32/store.c index 37247a5..20d71b7 100644 --- a/dlls/crypt32/store.c +++ b/dlls/crypt32/store.c @@ -782,12 +782,6 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore, TRACE("(%p, %p, %08x, %p)\n", hCertStore, pCertContext, dwAddDisposition, ppStoreContext); - /* Weird case to pass a test */ - if (dwAddDisposition == 0) - { - SetLastError(STATUS_ACCESS_VIOLATION); - return FALSE; - } if (dwAddDisposition != CERT_STORE_ADD_ALWAYS) { BYTE hashToAdd[20]; @@ -855,6 +849,7 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore, break; default: FIXME("Unimplemented add disposition %d\n", dwAddDisposition); + SetLastError(E_INVALIDARG); ret = FALSE; } diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index a31632b..5aa20ae 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -160,12 +160,16 @@ static void testAddCert(void) */ ret = CertAddEncodedCertificateToStore(0, X509_ASN_ENCODING, bigCert, sizeof(bigCert), 0, NULL); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || + GetLastError() == E_INVALIDARG), + "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", + GetLastError()); ret = CertAddEncodedCertificateToStore(store, X509_ASN_ENCODING, bigCert, sizeof(bigCert), 0, NULL); - ok(!ret && GetLastError() == STATUS_ACCESS_VIOLATION, - "Expected STATUS_ACCESS_VIOLATION, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == STATUS_ACCESS_VIOLATION || + GetLastError() == E_INVALIDARG), + "Expected STATUS_ACCESS_VIOLATION or E_INVALIDARG, got %08x\n", + GetLastError()); /* Weird--can add a cert to the NULL store (does this have special * meaning?)
1
0
0
0
Juan Lang : crypt32: Add to error message to track down NT4 failures.
by Alexandre Julliard
16 Feb '08
16 Feb '08
Module: wine Branch: master Commit: 79c39e379f5c9f57d6b7c54f578c58bd45847dd6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=79c39e379f5c9f57d6b7c54f5…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Feb 14 10:28:41 2008 -0800 crypt32: Add to error message to track down NT4 failures. --- dlls/crypt32/tests/cert.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/crypt32/tests/cert.c b/dlls/crypt32/tests/cert.c index cb3de1c..a31632b 100644 --- a/dlls/crypt32/tests/cert.c +++ b/dlls/crypt32/tests/cert.c @@ -326,8 +326,8 @@ static void checkHash(const BYTE *data, DWORD dataLen, ALG_ID algID, ok(ret, "CryptHashCertificate failed: %08x\n", GetLastError()); ret = CertGetCertificateContextProperty(context, propID, NULL, &dwSizeWithNull); - ok(ret, "CertGetCertificateContextProperty failed: %08x\n", - GetLastError()); + ok(ret, "algID %08x, propID %d: CertGetCertificateContextProperty failed: %08x\n", + algID, propID, GetLastError()); ret = CertGetCertificateContextProperty(context, propID, hashProperty, &size); ok(ret, "CertGetCertificateContextProperty failed: %08x\n",
1
0
0
0
Juan Lang : crypt32: Fix test failures on NT4.
by Alexandre Julliard
16 Feb '08
16 Feb '08
Module: wine Branch: master Commit: 5618fdb3df42dae1e7d17542dbe32dcb3145c103 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5618fdb3df42dae1e7d17542d…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Feb 14 10:17:54 2008 -0800 crypt32: Fix test failures on NT4. --- dlls/crypt32/tests/encode.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/dlls/crypt32/tests/encode.c b/dlls/crypt32/tests/encode.c index 74595fc..8e75689 100644 --- a/dlls/crypt32/tests/encode.c +++ b/dlls/crypt32/tests/encode.c @@ -5212,6 +5212,11 @@ static void test_encodePKCSSignerInfo(DWORD dwEncoding) SetLastError(0xdeadbeef); ret = pCryptEncodeObjectEx(dwEncoding, PKCS7_SIGNER_INFO, &info, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) + { + skip("no PKCS7_SIGNER_INFO encode support\n"); + return; + } ok(!ret && GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", GetLastError()); /* To be encoded, a signer must have an issuer at least, and the encoding @@ -5509,6 +5514,11 @@ static void test_encodeNameConstraints(DWORD dwEncoding) ret = pCryptEncodeObjectEx(dwEncoding, X509_NAME_CONSTRAINTS, &constraints, CRYPT_ENCODE_ALLOC_FLAG, NULL, (BYTE *)&buf, &size); + if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) + { + skip("no X509_NAME_CONSTRAINTS encode support\n"); + return; + } ok(ret, "CryptEncodeObjectEx failed: %08x\n", GetLastError()); if (ret) { @@ -5660,6 +5670,11 @@ static void test_decodeNameConstraints(DWORD dwEncoding) encodedNameConstraints[i].encoded.pbData, encodedNameConstraints[i].encoded.cbData, CRYPT_DECODE_ALLOC_FLAG, NULL, &constraints, &size); + if (!ret && GetLastError() == ERROR_FILE_NOT_FOUND) + { + skip("no X509_NAME_CONSTRAINTS decode support\n"); + return; + } ok(ret, "%d: CryptDecodeObjectEx failed: %08x\n", i, GetLastError()); if (ret) {
1
0
0
0
Juan Lang : advapi32: Fix CryptVerifySignatureW test failures on Win98SE and NT4.
by Alexandre Julliard
16 Feb '08
16 Feb '08
Module: wine Branch: master Commit: 3138f87e73c4a82e908e017d91c69442a4d6a077 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3138f87e73c4a82e908e017d9…
Author: Juan Lang <juan.lang(a)gmail.com> Date: Thu Feb 14 10:12:21 2008 -0800 advapi32: Fix CryptVerifySignatureW test failures on Win98SE and NT4. --- dlls/advapi32/tests/crypt.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/advapi32/tests/crypt.c b/dlls/advapi32/tests/crypt.c index 413e201..d6453d4 100644 --- a/dlls/advapi32/tests/crypt.c +++ b/dlls/advapi32/tests/crypt.c @@ -425,12 +425,16 @@ static void test_verify_sig(void) "Expected ERROR_INVALID_PARAMETER, got %08x\n", GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(hash, NULL, 0, key, NULL, 0); - ok(!ret && GetLastError() == NTE_BAD_SIGNATURE, - "Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || + GetLastError() == ERROR_INVALID_PARAMETER), + "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n", + GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(hash, NULL, sizeof(bogus), key, NULL, 0); - ok(!ret && GetLastError() == NTE_BAD_SIGNATURE, - "Expected NTE_BAD_SIGNATURE, got %08x\n", GetLastError()); + ok(!ret && (GetLastError() == NTE_BAD_SIGNATURE || + GetLastError() == ERROR_INVALID_PARAMETER), + "Expected NTE_BAD_SIGNATURE or ERROR_INVALID_PARAMETER, got %08x\n", + GetLastError()); SetLastError(0xdeadbeef); ret = pCryptVerifySignatureW(hash, bogus, 0, key, NULL, 0); ok(!ret && GetLastError() == NTE_BAD_SIGNATURE,
1
0
0
0
Francois Gouget : Assorted spelling fixes.
by Alexandre Julliard
15 Feb '08
15 Feb '08
Module: wine Branch: master Commit: 4c8e218252d852d62562ca2029c2f8cc4de03484 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4c8e218252d852d62562ca202…
Author: Francois Gouget <fgouget(a)free.fr> Date: Wed Feb 13 22:11:01 2008 +0100 Assorted spelling fixes. --- dlls/comdlg32/colordlg.c | 2 +- dlls/comdlg32/colordlg16.c | 2 +- dlls/comdlg32/filedlg.c | 8 ++++---- dlls/comdlg32/filedlg16.c | 4 ++-- dlls/comdlg32/printdlg.c | 2 +- dlls/crypt32/rootstore.c | 2 +- dlls/crypt32/tests/msg.c | 2 +- dlls/crypt32/tests/store.c | 2 +- dlls/ctapi32/ctapi.h | 2 +- dlls/d3d8/tests/device.c | 2 +- dlls/d3d9/tests/device.c | 14 +++++++------- dlls/ddraw/surface.c | 2 +- dlls/ddraw/tests/visual.c | 4 ++-- dlls/localspl/localspl_main.c | 2 +- dlls/msxml3/docfrag.c | 2 +- dlls/msxml3/entityref.c | 2 +- dlls/ole32/stg_bigblockfile.c | 2 +- dlls/urlmon/tests/stream.c | 2 +- dlls/urlmon/tests/url.c | 2 +- include/wine/mscvpdb.h | 2 +- programs/cmd/builtins.c | 2 +- 21 files changed, 32 insertions(+), 32 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=4c8e218252d852d62562c…
1
0
0
0
Rico Schüller : wined3d: Fix memcpy with wrong size parameter to simple assignment in GetScissorRect .
by Alexandre Julliard
15 Feb '08
15 Feb '08
Module: wine Branch: master Commit: 59a43c4cc9cfb5056988c0d2cce53cc1ae4733cf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=59a43c4cc9cfb5056988c0d2c…
Author: Rico Schüller <kgbricola(a)web.de> Date: Wed Feb 13 20:55:43 2008 +0100 wined3d: Fix memcpy with wrong size parameter to simple assignment in GetScissorRect. --- dlls/wined3d/device.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index bf41d08..952e796 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3180,7 +3180,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetScissorRect(IWineD3DDevice *iface, C static HRESULT WINAPI IWineD3DDeviceImpl_GetScissorRect(IWineD3DDevice *iface, RECT* pRect) { IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface; - memcpy(pRect, &This->updateStateBlock->scissorRect, sizeof(pRect)); + *pRect = This->updateStateBlock->scissorRect; TRACE("(%p)Returning a Scissor Rect of %d:%d-%d:%d\n", This, pRect->left, pRect->top, pRect->right, pRect->bottom); return WINED3D_OK; }
1
0
0
0
Alexandre Julliard : kernel32: On Mac OS, recompose the Unicode strings we get from the OS.
by Alexandre Julliard
15 Feb '08
15 Feb '08
Module: wine Branch: master Commit: 58913b439b797462a70794774b87e63283109617 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=58913b439b797462a70794774…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Feb 15 12:07:56 2008 +0100 kernel32: On Mac OS, recompose the Unicode strings we get from the OS. --- dlls/kernel32/locale.c | 3 +++ dlls/ntdll/rtlstr.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dlls/kernel32/locale.c b/dlls/kernel32/locale.c index a13c346..1130349 100644 --- a/dlls/kernel32/locale.c +++ b/dlls/kernel32/locale.c @@ -1830,6 +1830,9 @@ INT WINAPI MultiByteToWideChar( UINT page, DWORD flags, LPCSTR src, INT srclen, ret = wine_cp_mbstowcs( unix_cptable, flags, src, srclen, dst, dstlen ); break; } +#ifdef __APPLE__ + flags |= MB_COMPOSITE; /* work around broken Mac OS X filesystem that enforces decomposed Unicode */ +#endif /* fall through */ case CP_UTF8: ret = wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen ); diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index ecd8523..deec931 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -64,7 +64,10 @@ void __wine_init_codepages( const union cptable *ansi, const union cptable *oem, } int ntdll_umbstowcs(DWORD flags, const char* src, int srclen, WCHAR* dst, int dstlen) -{ +{ +#ifdef __APPLE__ + flags |= MB_COMPOSITE; /* work around broken Mac OS X filesystem that enforces decomposed Unicode */ +#endif return (unix_table) ? wine_cp_mbstowcs( unix_table, flags, src, srclen, dst, dstlen ) : wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen );
1
0
0
0
Alexandre Julliard : libwine: Add option for Unicode composition in utf-8 - > wchar conversion.
by Alexandre Julliard
15 Feb '08
15 Feb '08
Module: wine Branch: master Commit: 86ff825f41572f9d74b899810aa1b613287daeaa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=86ff825f41572f9d74b899810…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Feb 15 12:06:58 2008 +0100 libwine: Add option for Unicode composition in utf-8 -> wchar conversion. --- libs/wine/utf8.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++ libs/wine/wctomb.c | 2 +- 2 files changed, 93 insertions(+), 1 deletions(-) diff --git a/libs/wine/utf8.c b/libs/wine/utf8.c index fcb4e23..c95bc51 100644 --- a/libs/wine/utf8.c +++ b/libs/wine/utf8.c @@ -22,6 +22,8 @@ #include "wine/unicode.h" +extern WCHAR compose( const WCHAR *str ); + /* number of following bytes in sequence based on first byte value (for bytes above 0x7f) */ static const char utf8_length[128] = { @@ -183,6 +185,94 @@ static inline unsigned int decode_utf8_char( unsigned char ch, const char **str, return ~0; } +/* query necessary dst length for src string with composition */ +static inline int get_length_mbs_utf8_compose( int flags, const char *src, int srclen ) +{ + int ret = 0; + unsigned int res; + WCHAR composed[2]; + const char *srcend = src + srclen; + + composed[0] = 0; + while (src < srcend) + { + unsigned char ch = *src++; + if (ch < 0x80) /* special fast case for 7-bit ASCII */ + { + composed[0] = ch; + ret++; + continue; + } + if ((res = decode_utf8_char( ch, &src, srcend )) <= 0xffff) + { + if (composed[0]) + { + composed[1] = res; + if ((composed[0] = compose( composed ))) continue; + } + composed[0] = res; + ret++; + } + else if (res <= 0x10ffff) + { + ret += 2; + composed[0] = 0; /* no composition for surrogates */ + } + else if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */ + /* otherwise ignore it */ + } + return ret; +} + +/* UTF-8 to wide char string conversion with composition */ +/* return -1 on dst buffer overflow, -2 on invalid input char */ +static int utf8_mbstowcs_compose( int flags, const char *src, int srclen, WCHAR *dst, int dstlen ) +{ + unsigned int res; + const char *srcend = src + srclen; + WCHAR composed[2]; + WCHAR *dstend = dst + dstlen; + + if (!dstlen) return get_length_mbs_utf8_compose( flags, src, srclen ); + + composed[0] = 0; + while (src < srcend) + { + unsigned char ch = *src++; + if (ch < 0x80) /* special fast case for 7-bit ASCII */ + { + if (dst >= dstend) return -1; /* overflow */ + *dst++ = composed[0] = ch; + continue; + } + if ((res = decode_utf8_char( ch, &src, srcend )) <= 0xffff) + { + if (composed[0]) + { + composed[1] = res; + if ((composed[0] = compose( composed ))) + { + dst[-1] = composed[0]; + continue; + } + } + if (dst >= dstend) return -1; /* overflow */ + *dst++ = composed[0] = res; + } + else if (res <= 0x10ffff) /* we need surrogates */ + { + if (dst >= dstend - 1) return -1; /* overflow */ + res -= 0x10000; + *dst++ = 0xd800 | (res >> 10); + *dst++ = 0xdc00 | (res & 0x3ff); + composed[0] = 0; /* no composition for surrogates */ + } + else if (flags & MB_ERR_INVALID_CHARS) return -2; /* bad char */ + /* otherwise ignore it */ + } + return dstlen - (dstend - dst); +} + /* query necessary dst length for src string */ static inline int get_length_mbs_utf8( int flags, const char *src, int srclen ) { @@ -217,6 +307,8 @@ int wine_utf8_mbstowcs( int flags, const char *src, int srclen, WCHAR *dst, int const char *srcend = src + srclen; WCHAR *dstend = dst + dstlen; + if (flags & MB_COMPOSITE) return utf8_mbstowcs_compose( flags, src, srclen, dst, dstlen ); + if (!dstlen) return get_length_mbs_utf8( flags, src, srclen ); while ((dst < dstend) && (src < srcend)) diff --git a/libs/wine/wctomb.c b/libs/wine/wctomb.c index 5ad027a..966e6af 100644 --- a/libs/wine/wctomb.c +++ b/libs/wine/wctomb.c @@ -45,7 +45,7 @@ static inline int binary_search( WCHAR ch, int low, int high ) } /* return the result of the composition of two Unicode chars, or 0 if none */ -static WCHAR compose( const WCHAR *str ) +WCHAR compose( const WCHAR *str ) { extern const WCHAR unicode_compose_table[]; extern const unsigned int unicode_compose_table_size;
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
...
100
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
Results per page:
10
25
50
100
200