Juan Lang : crypt32: Don't fail if buffer is NULL, just return required size.
Alexandre Julliard
julliard at winehq.org
Fri Oct 5 04:55:57 CDT 2007
Module: wine
Branch: master
Commit: 53b7babcbbe88b8366e7bced3b11c0cec454fcc3
URL: http://source.winehq.org/git/wine.git/?a=commit;h=53b7babcbbe88b8366e7bced3b11c0cec454fcc3
Author: Juan Lang <juan.lang at gmail.com>
Date: Thu Oct 4 14:53:11 2007 -0700
crypt32: Don't fail if buffer is NULL, just return required size.
---
dlls/crypt32/cert.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/crypt32/cert.c b/dlls/crypt32/cert.c
index 9600bb1..13ef4d4 100644
--- a/dlls/crypt32/cert.c
+++ b/dlls/crypt32/cert.c
@@ -2037,7 +2037,9 @@ BOOL WINAPI CertGetValidUsages(DWORD cCerts, PCCERT_CONTEXT *rghCerts,
}
else
{
- if (!rghOIDs || *pcbOIDs < cbOIDs)
+ if (!rghOIDs)
+ *pcbOIDs = cbOIDs;
+ else if (*pcbOIDs < cbOIDs)
{
*pcbOIDs = cbOIDs;
SetLastError(ERROR_MORE_DATA);
More information about the wine-cvs
mailing list