[CRYPT32] CRYPT_ExportKeyTrans(): Check 'CRYPT_ConstructBitBlob()' return value (#2983)

Import 3e8b07309c
CORE-8156

Co-authored-by: Victor Martinez Calvo <vmartinez@reactos.org>
This commit is contained in:
Serge Gautherie 2020-07-18 15:40:05 +02:00 committed by GitHub
parent b509658280
commit 0f8306b37f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1574,9 +1574,8 @@ static BOOL WINAPI CRYPT_ExportKeyTrans(
ret = CRYPT_ConstructAlgorithmId(&keyInfo.Algorithm,
&pKeyTransEncodeInfo->KeyEncryptionAlgorithm);
if (ret)
CRYPT_ConstructBitBlob(&keyInfo.PublicKey,
ret = CRYPT_ConstructBitBlob(&keyInfo.PublicKey,
&pKeyTransEncodeInfo->RecipientPublicKey);
if (ret)
ret = CryptImportPublicKeyInfo(pKeyTransEncodeInfo->hCryptProv,
X509_ASN_ENCODING, &keyInfo, &expKey);