crypt32: Return an empty string from CertGetNameStringW if a name couldn't be found.

This commit is contained in:
Juan Lang 2009-09-08 21:55:26 -07:00 committed by Alexandre Julliard
parent c7db5ee6a7
commit 7d83106427
1 changed files with 10 additions and 0 deletions

View File

@ -1034,5 +1034,15 @@ DWORD WINAPI CertGetNameStringW(PCCERT_CONTEXT pCertContext, DWORD dwType,
FIXME("unimplemented for type %d\n", dwType);
ret = 0;
}
if (!ret)
{
if (!pszNameString)
ret = 1;
else if (cchNameString)
{
pszNameString[0] = 0;
ret = 1;
}
}
return ret;
}