diff options
author | Ben Laurie <ben@links.org> | 2014-07-10 17:47:48 +0100 |
---|---|---|
committer | Ben Laurie <ben@links.org> | 2014-07-10 17:49:53 +0100 |
commit | 5e189b4b8d5b24454eb65b685d598b6922299769 (patch) | |
tree | 7a2838a4fa86d3b222895b2f7fdf4effa8747149 /crypto/cms/cms_pwri.c | |
parent | 23bd628735ee1a4d271af330f7e698bbce0ef386 (diff) |
Don't clean up uninitialised EVP_CIPHER_CTX on error (CID 483259).
(cherry picked from commit c1d1b0114e9d370c30649e46182393dbfc00e20c)
Diffstat (limited to 'crypto/cms/cms_pwri.c')
-rw-r--r-- | crypto/cms/cms_pwri.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/cms/cms_pwri.c b/crypto/cms/cms_pwri.c index b79612a12d..71f2ddb496 100644 --- a/crypto/cms/cms_pwri.c +++ b/crypto/cms/cms_pwri.c @@ -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; |