crypt32: Always set *ppszError.
This commit is contained in:
parent
e0b8e37bf0
commit
dda8053179
|
@ -474,6 +474,8 @@ BOOL WINAPI CertStrToNameA(DWORD dwCertEncodingType, LPCSTR pszX500,
|
|||
pvReserved, pbEncoded, pcbEncoded,
|
||||
ppszError ? (LPCWSTR *)&errorStr : NULL);
|
||||
if (ppszError)
|
||||
{
|
||||
if (!ret)
|
||||
{
|
||||
DWORD i;
|
||||
|
||||
|
@ -481,6 +483,9 @@ BOOL WINAPI CertStrToNameA(DWORD dwCertEncodingType, LPCSTR pszX500,
|
|||
for (i = 0; i < errorStr - x500; i++)
|
||||
*ppszError = CharNextA(*ppszError);
|
||||
}
|
||||
else
|
||||
*ppszError = NULL;
|
||||
}
|
||||
CryptMemFree(x500);
|
||||
}
|
||||
else
|
||||
|
@ -827,6 +832,8 @@ BOOL WINAPI CertStrToNameW(DWORD dwCertEncodingType, LPCWSTR pszX500,
|
|||
CRYPT_FreeKeynameKeeper(&keeper);
|
||||
if (!error)
|
||||
{
|
||||
if (ppszError)
|
||||
*ppszError = NULL;
|
||||
ret = CryptEncodeObjectEx(dwCertEncodingType, X509_NAME, &info,
|
||||
0, NULL, pbEncoded, pcbEncoded);
|
||||
for (i = 0; i < info.cRDN; i++)
|
||||
|
|
Loading…
Reference in New Issue