crypt32: Return FALSE rather than crash if memory allocation fails. Fixes Coverity id 135.

This commit is contained in:
Juan Lang 2008-09-09 10:22:59 -07:00 committed by Alexandre Julliard
parent 71e394fb89
commit e4a0633818
1 changed files with 5 additions and 0 deletions

View File

@ -607,6 +607,11 @@ static BOOL CRYPT_AcquirePrivateKeyFromProvInfo(PCCERT_CONTEXT pCert,
CERT_KEY_PROV_INFO_PROP_ID, info, &size);
allocated = TRUE;
}
else
{
SetLastError(ERROR_OUTOFMEMORY);
ret = FALSE;
}
}
else
SetLastError(CRYPT_E_NO_KEY_PROPERTY);