From 9a85565ed3ea8cff359bcd39d4679939694df598 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Tue, 26 Nov 2024 11:13:07 -0500 Subject: [PATCH] Don't access the read_buffer directly in read_v2_client_hello I missed a spot in https://boringssl-review.googlesource.com/21865. The function is passed an input span and should just work with that span. This does the exact same thing rigth now in == read_buffer.span() right now. But we'll want this if we ever add a bytes-in/bytes-out API. Change-Id: Ie12ad783b77b78335beba3a27da4d205ec828077 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/73547 Commit-Queue: Bob Beck Auto-Submit: David Benjamin Reviewed-by: Bob Beck --- ssl/s3_both.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssl/s3_both.cc b/ssl/s3_both.cc index 6912dc49e..26b28c618 100644 --- a/ssl/s3_both.cc +++ b/ssl/s3_both.cc @@ -385,7 +385,7 @@ static ssl_open_record_t read_v2_client_hello(SSL *ssl, size_t *out_consumed, return ssl_open_record_partial; } - CBS v2_client_hello = CBS(ssl->s3->read_buffer.span().subspan(2, msg_length)); + CBS v2_client_hello = CBS(in.subspan(2, msg_length)); // The V2ClientHello without the length is incorporated into the handshake // hash. This is only ever called at the start of the handshake, so hs is // guaranteed to be non-NULL.