aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2015-03-06 14:37:17 +0000
committerMatt Caswell <matt@openssl.org>2015-03-23 15:23:11 +0000
commit69f682374868ba2b19a8aeada496bf03dbb037cf (patch)
tree1c7717928dc7eecd832f2c864ff19c63af708ffc /ssl/s3_enc.c
parent4bcdb4a6019e57b3de077b17940e18befe745531 (diff)
downloadopenssl-69f682374868ba2b19a8aeada496bf03dbb037cf.tar.gz
Fix missing return value checks
Ensure that all functions have their return values checked where appropriate. This covers all functions defined and called from within libssl. Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r--ssl/s3_enc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index 83a576ad1a..bcefe12769 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -253,7 +253,10 @@ int ssl3_change_cipher_state(SSL *s, int which)
EVP_CIPHER_CTX_init(s->enc_read_ctx);
dd = s->enc_read_ctx;
- ssl_replace_hash(&s->read_hash, m);
+ if(!ssl_replace_hash(&s->read_hash, m)) {
+ SSLerr(SSL_F_SSL3_CHANGE_CIPHER_STATE, ERR_R_INTERNAL_ERROR);
+ goto err2;
+ }
#ifndef OPENSSL_NO_COMP
/* COMPRESS */
if (s->expand != NULL) {
@@ -288,7 +291,10 @@ int ssl3_change_cipher_state(SSL *s, int which)
*/
EVP_CIPHER_CTX_init(s->enc_write_ctx);
dd = s->enc_write_ctx;
- ssl_replace_hash(&s->write_hash, m);
+ if(!ssl_replace_hash(&s->write_hash, m)) {
+ SSLerr(SSL_F_SSL3_CHANGE_CIPHER_STATE, ERR_R_INTERNAL_ERROR);
+ goto err2;
+ }
#ifndef OPENSSL_NO_COMP
/* COMPRESS */
if (s->compress != NULL) {