libfreerdp/crypto/certificate.c: handle malloc error

This commit is contained in:
Ilya Shipitsin 2024-04-05 11:57:23 +02:00 committed by David Fort
parent 8b2e13d989
commit 25edec803b

View File

@ -1615,6 +1615,8 @@ BOOL freerdp_certificate_publickey_encrypt(const rdpCertificate* cert, const BYT
size_t outputSize = EVP_PKEY_size(pkey);
output = malloc(outputSize);
if (output == NULL)
goto out;
*pcbOutput = outputSize;
if (EVP_PKEY_encrypt_init(ctx) != 1 ||