summaryrefslogtreecommitdiffstats
path: root/ssl/s3_enc.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-06-10 16:51:39 +0100
committerMatt Caswell <matt@openssl.org>2016-06-13 17:38:39 +0100
commitd356dc561925ec9cecc58a69e2280c18a49ec41a (patch)
tree3c6310c4182f1faf43e09f8a71c1fd0ceab36607 /ssl/s3_enc.c
parentc887104f4ac27a2743c0c830d20c1e341180a48b (diff)
Add some missing return value checks
Some misc return value checks Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'ssl/s3_enc.c')
-rw-r--r--ssl/s3_enc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ssl/s3_enc.c b/ssl/s3_enc.c
index f7089bd6fb..b6de38d90b 100644
--- a/ssl/s3_enc.c
+++ b/ssl/s3_enc.c
@@ -415,7 +415,10 @@ int ssl3_final_finish_mac(SSL *s, const char *sender, int len, unsigned char *p)
SSLerr(SSL_F_SSL3_FINAL_FINISH_MAC, ERR_R_MALLOC_FAILURE);
return 0;
}
- EVP_MD_CTX_copy_ex(ctx, s->s3->handshake_dgst);
+ if (!EVP_MD_CTX_copy_ex(ctx, s->s3->handshake_dgst)) {
+ SSLerr(SSL_F_SSL3_FINAL_FINISH_MAC, ERR_R_INTERNAL_ERROR);
+ return 0;
+ }
ret = EVP_MD_CTX_size(ctx);
if (ret < 0) {