]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Don't reset the packet pointer in ssl3_setup_read_buffer
authorMatt Caswell <matt@openssl.org>
Tue, 13 Jul 2021 16:19:12 +0000 (17:19 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 16 Jul 2021 10:31:36 +0000 (11:31 +0100)
Sometimes this function gets called when the buffers have already been
set up. If there is already a partial packet in the read buffer then the
packet pointer will be set to an incorrect value. The packet pointer already
gets reset to the correct value when we first read a packet anyway, so we
don't also need to do it in ssl3_setup_read_buffer.

Fixes #13729

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16098)

ssl/record/ssl3_buffer.c

index 9b2a6964c68912eff1b578ca300ff25ec0cef16d..c99f5bd2495f90869fabbc3245a80a1c30aed271 100644 (file)
@@ -74,7 +74,6 @@ int ssl3_setup_read_buffer(SSL *s)
         b->len = len;
     }
 
-    RECORD_LAYER_set_packet(&s->rlayer, &(b->buf[0]));
     return 1;
 }