diff options
author | Matt Caswell <matt@openssl.org> | 2016-06-10 17:51:39 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-06-13 18:38:39 +0200 |
commit | d356dc561925ec9cecc58a69e2280c18a49ec41a (patch) | |
tree | 3c6310c4182f1faf43e09f8a71c1fd0ceab36607 /ssl/s3_enc.c | |
parent | Update sslapitest to use the test framework (diff) | |
download | openssl-d356dc561925ec9cecc58a69e2280c18a49ec41a.tar.xz openssl-d356dc561925ec9cecc58a69e2280c18a49ec41a.zip |
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.c | 5 |
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) { |