[openssl-commits] [openssl] master update

Matt Caswell matt at openssl.org
Wed Aug 26 15:31:31 UTC 2015


The branch master has been updated
       via  95cdad6344c72c84761a4da290d384f8de730407 (commit)
      from  ec30e8566e43d888ab1d7cf01749a979896bb3d9 (commit)


- Log -----------------------------------------------------------------
commit 95cdad6344c72c84761a4da290d384f8de730407
Author: Matt Caswell <matt at openssl.org>
Date:   Wed Aug 26 16:22:45 2015 +0100

    Clean up reset of read/write sequences
    
    Use sizeof instead of an explicit size, and use the functions for the
    purpose.
    
    Reviewed-by: Rich Salz <rsalz at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 ssl/record/rec_layer_s3.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/ssl/record/rec_layer_s3.c b/ssl/record/rec_layer_s3.c
index 5b28663..6beb8ce 100644
--- a/ssl/record/rec_layer_s3.c
+++ b/ssl/record/rec_layer_s3.c
@@ -166,8 +166,8 @@ void RECORD_LAYER_clear(RECORD_LAYER *rl)
     SSL3_RECORD_clear(&rl->rrec);
     SSL3_RECORD_clear(&rl->wrec);
 
-    memset(rl->read_sequence, 0, sizeof(rl->read_sequence));
-    memset(rl->write_sequence, 0, sizeof(rl->write_sequence));
+    RECORD_LAYER_reset_read_sequence(rl);
+    RECORD_LAYER_reset_write_sequence(rl);
     
     if (rl->d)
         DTLS_RECORD_LAYER_clear(rl);
@@ -219,12 +219,12 @@ void RECORD_LAYER_dup(RECORD_LAYER *dst, RECORD_LAYER *src)
 
 void RECORD_LAYER_reset_read_sequence(RECORD_LAYER *rl)
 {
-    memset(rl->read_sequence, 0, 8);
+    memset(rl->read_sequence, 0, sizeof(rl->read_sequence));
 }
 
 void RECORD_LAYER_reset_write_sequence(RECORD_LAYER *rl)
 {
-    memset(rl->write_sequence, 0, 8);
+    memset(rl->write_sequence, 0, sizeof(rl->write_sequence));
 }
 
 int RECORD_LAYER_setup_comp_buffer(RECORD_LAYER *rl)


More information about the openssl-commits mailing list