From: Matt Caswell Date: Tue, 13 Jul 2021 16:19:12 +0000 (+0100) Subject: Don't reset the packet pointer in ssl3_setup_read_buffer X-Git-Tag: OpenSSL_1_1_1l~45 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97664088f3b332cfd462e3d209983115ef88cfc9;p=thirdparty%2Fopenssl.git Don't reset the packet pointer in ssl3_setup_read_buffer 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 Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/16098) --- diff --git a/ssl/record/ssl3_buffer.c b/ssl/record/ssl3_buffer.c index 9b2a6964c68..c99f5bd2495 100644 --- a/ssl/record/ssl3_buffer.c +++ b/ssl/record/ssl3_buffer.c @@ -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; }