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:52:37 +0100 |
commit | 3ed632757126473aebcb1dd486306eb7b62c341f (patch) | |
tree | 164b7f546c3da8404911f25f403c1d12d2ec706b | |
parent | efd4f1dfd30a5894a1f663c832e287da608c3290 (diff) |
Don't clean up uninitialised EVP_CIPHER_CTX on error (CID 483259).
(cherry picked from commit c1d1b0114e9d370c30649e46182393dbfc00e20c)
-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; |