Make sure we reset the read sequence when skipping records
authorMatt Caswell <matt@openssl.org>
Thu, 23 Feb 2017 16:05:57 +0000 (16:05 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 2 Mar 2017 17:44:15 +0000 (17:44 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)

ssl/record/ssl3_record.c

index 94c221f558ba6bbc06fbbb95b7f9e5054f24d104..3228bda4b9afd4a1a6b59cea8744b67ac46c26a5 100644 (file)
@@ -433,6 +433,7 @@ int ssl3_get_record(SSL *s)
             thisrr->length = 0;
             thisrr->read = 1;
             RECORD_LAYER_set_numrpipes(&s->rlayer, 1);
+            RECORD_LAYER_reset_read_sequence(&s->rlayer);
             return 1;
         }
         al = SSL_AD_DECRYPTION_FAILED;
@@ -516,6 +517,7 @@ int ssl3_get_record(SSL *s)
             thisrr->length = 0;
             thisrr->read = 1;
             RECORD_LAYER_set_numrpipes(&s->rlayer, 1);
+            RECORD_LAYER_reset_read_sequence(&s->rlayer);
             return 1;
         }
         /*