aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/p5_pbev2.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2009-09-23 23:43:49 +0000
committerDr. Stephen Henson <steve@openssl.org>2009-09-23 23:43:49 +0000
commitb6dcdbfc94c482f6c15ba725754fc9e827e41851 (patch)
tree9fec84d4564530bc97b42d56e01a64abb96adac3 /crypto/asn1/p5_pbev2.c
parentcd4f7cddc7994d23d48b86cf638541c6e2310c2d (diff)
downloadopenssl-b6dcdbfc94c482f6c15ba725754fc9e827e41851.tar.gz
Audit libcrypto for unchecked return values: fix all cases enountered
Diffstat (limited to 'crypto/asn1/p5_pbev2.c')
-rw-r--r--crypto/asn1/p5_pbev2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/asn1/p5_pbev2.c b/crypto/asn1/p5_pbev2.c
index cb49b6651d..377edaffc9 100644
--- a/crypto/asn1/p5_pbev2.c
+++ b/crypto/asn1/p5_pbev2.c
@@ -127,7 +127,8 @@ X509_ALGOR *PKCS5_pbe2_set_iv(const EVP_CIPHER *cipher, int iter,
EVP_CIPHER_CTX_init(&ctx);
/* Dummy cipherinit to just setup the IV, and PRF */
- EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0);
+ if (!EVP_CipherInit_ex(&ctx, cipher, NULL, NULL, iv, 0))
+ goto err;
if(EVP_CIPHER_param_to_asn1(&ctx, scheme->parameter) < 0) {
ASN1err(ASN1_F_PKCS5_PBE2_SET_IV,
ASN1_R_ERROR_SETTING_CIPHER_PARAMS);