diff options
author | Jon Spillett <jon.spillett@oracle.com> | 2017-03-02 12:54:06 +1000 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2017-03-02 09:28:58 -0500 |
commit | a3004c820370b6bee82c919721fb1cbe95f72f3f (patch) | |
tree | 8e473d6ac516c8f65d317049756f64cf4f12af32 | |
parent | fd74aba83652a8410a74b59de0b098232af74e33 (diff) | |
download | openssl-a3004c820370b6bee82c919721fb1cbe95f72f3f.tar.gz |
Check for zero records and return immediately
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2822)
-rw-r--r-- | ssl/record/ssl3_record.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/record/ssl3_record.c b/ssl/record/ssl3_record.c index 84f54cbabd..3868bb5d82 100644 --- a/ssl/record/ssl3_record.c +++ b/ssl/record/ssl3_record.c @@ -740,6 +740,9 @@ int tls1_enc(SSL *s, SSL3_RECORD *recs, size_t n_recs, int send) int imac_size; const EVP_CIPHER *enc; + if (n_recs == 0) + return 0; + if (send) { if (EVP_MD_CTX_md(s->write_hash)) { int n = EVP_MD_CTX_size(s->write_hash); |