diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-09-24 01:43:49 +0200 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-09-24 01:43:49 +0200 |
commit | b6dcdbfc94c482f6c15ba725754fc9e827e41851 (patch) | |
tree | 9fec84d4564530bc97b42d56e01a64abb96adac3 /crypto/evp/e_rc2.c | |
parent | Add more return value checking attributes to evp.h and hmac.h (diff) | |
download | openssl-b6dcdbfc94c482f6c15ba725754fc9e827e41851.tar.xz openssl-b6dcdbfc94c482f6c15ba725754fc9e827e41851.zip |
Audit libcrypto for unchecked return values: fix all cases enountered
Diffstat (limited to 'crypto/evp/e_rc2.c')
-rw-r--r-- | crypto/evp/e_rc2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/evp/e_rc2.c b/crypto/evp/e_rc2.c index f78d781129..d4c33b58d4 100644 --- a/crypto/evp/e_rc2.c +++ b/crypto/evp/e_rc2.c @@ -183,7 +183,8 @@ static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) key_bits =rc2_magic_to_meth((int)num); if (!key_bits) return(-1); - if(i > 0) EVP_CipherInit_ex(c, NULL, NULL, NULL, iv, -1); + if(i > 0 && !EVP_CipherInit_ex(c, NULL, NULL, NULL, iv, -1)) + return -1; EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_RC2_KEY_BITS, key_bits, NULL); EVP_CIPHER_CTX_set_key_length(c, key_bits / 8); } |