summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormiod <>2014-07-11 15:42:34 +0000
committermiod <>2014-07-11 15:42:34 +0000
commit6cdb48c68b6343b145942412ab1c819a6f8387af (patch)
treec6685265302b50c960e55181dae46416e0efdde8
parent0c704e3208713fc9baf5006671edf39a365e1009 (diff)
downloadopenbsd-6cdb48c68b6343b145942412ab1c819a6f8387af.tar.gz
openbsd-6cdb48c68b6343b145942412ab1c819a6f8387af.tar.bz2
openbsd-6cdb48c68b6343b145942412ab1c819a6f8387af.zip
Avoid invoking EVP_CIPHER_CTX_cleanup() on uninitialized memory; from
Coverity via OpenSSL trunk
-rw-r--r--src/lib/libcrypto/cms/cms_pwri.c4
-rw-r--r--src/lib/libssl/src/crypto/cms/cms_pwri.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/cms/cms_pwri.c b/src/lib/libcrypto/cms/cms_pwri.c
index ea3fbf87dd..b7c3038027 100644
--- a/src/lib/libcrypto/cms/cms_pwri.c
+++ b/src/lib/libcrypto/cms/cms_pwri.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_pwri.c,v 1.6 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: cms_pwri.c,v 1.7 2014/07/11 15:42:34 miod Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -96,7 +96,7 @@ CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid,
96 96
97 env = cms_get0_enveloped(cms); 97 env = cms_get0_enveloped(cms);
98 if (!env) 98 if (!env)
99 goto err; 99 return NULL;
100 100
101 if (wrap_nid <= 0) 101 if (wrap_nid <= 0)
102 wrap_nid = NID_id_alg_PWRI_KEK; 102 wrap_nid = NID_id_alg_PWRI_KEK;
diff --git a/src/lib/libssl/src/crypto/cms/cms_pwri.c b/src/lib/libssl/src/crypto/cms/cms_pwri.c
index ea3fbf87dd..b7c3038027 100644
--- a/src/lib/libssl/src/crypto/cms/cms_pwri.c
+++ b/src/lib/libssl/src/crypto/cms/cms_pwri.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: cms_pwri.c,v 1.6 2014/07/11 08:44:48 jsing Exp $ */ 1/* $OpenBSD: cms_pwri.c,v 1.7 2014/07/11 15:42:34 miod Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -96,7 +96,7 @@ CMS_add0_recipient_password(CMS_ContentInfo *cms, int iter, int wrap_nid,
96 96
97 env = cms_get0_enveloped(cms); 97 env = cms_get0_enveloped(cms);
98 if (!env) 98 if (!env)
99 goto err; 99 return NULL;
100 100
101 if (wrap_nid <= 0) 101 if (wrap_nid <= 0)
102 wrap_nid = NID_id_alg_PWRI_KEK; 102 wrap_nid = NID_id_alg_PWRI_KEK;