Module: wine Branch: master Commit: dcb8c874e875695208dd230e64f39120582921f9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=dcb8c874e875695208dd230e64...
Author: Juan Lang juan.lang@gmail.com Date: Mon Oct 22 10:22:50 2007 -0700
cryptnet: Return FALSE if the requested URL exists and the url array size is NULL.
---
dlls/cryptnet/cryptnet_main.c | 3 +++ dlls/cryptnet/tests/cryptnet.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c index 049e52d..3a25fb5 100644 --- a/dlls/cryptnet/cryptnet_main.c +++ b/dlls/cryptnet/cryptnet_main.c @@ -174,7 +174,10 @@ static BOOL WINAPI CRYPT_GetUrlFromCertificateCRLDistPoint(LPCSTR pszUrlOid, } } if (!pcbUrlArray) + { SetLastError(E_INVALIDARG); + ret = FALSE; + } else if (!pUrlArray) *pcbUrlArray = bytesNeeded; else if (*pcbUrlArray < bytesNeeded) diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c index 221a29d..25edaa6 100644 --- a/dlls/cryptnet/tests/cryptnet.c +++ b/dlls/cryptnet/tests/cryptnet.c @@ -175,13 +175,11 @@ static void test_getObjectUrl(void) SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, 0, NULL, NULL, NULL, NULL, NULL); - todo_wine ok(!ret && GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", GetLastError()); SetLastError(0xdeadbeef); ret = CryptGetObjectUrl(URL_OID_CERTIFICATE_CRL_DIST_POINT, (void *)cert, 0, NULL, NULL, NULL, &infoSize, NULL); - todo_wine ok(!ret && GetLastError() == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", GetLastError()); /* Can get it without specifying the location: */