Don't clean up uninitialised EVP_CIPHER_CTX on error (CID 483259).

This commit is contained in:
Ben Laurie 2014-07-10 17:47:48 +01:00
parent 66816c53be
commit c1d1b0114e

View file

@ -93,9 +93,10 @@ CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
X509_ALGOR *encalg = NULL;
unsigned char iv[EVP_MAX_IV_LENGTH];
int ivlen;
env = cms_get0_enveloped(cms);
if (!env)
goto err;
return NULL;
if (wrap_nid <= 0)
wrap_nid = NID_id_alg_PWRI_KEK;