crypt32: Don't fail if buffer is NULL, just return required size.

This commit is contained in:
Juan Lang 2007-10-04 14:53:11 -07:00 committed by Alexandre Julliard
parent 851e19b3f9
commit 53b7babcbb
1 changed files with 3 additions and 1 deletions

View File

@ -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);