From 4612eec35def0523192ee2c406f99ea5bbb184fb Mon Sep 17 00:00:00 2001 From: Juergen Christ Date: Tue, 25 May 2021 18:03:06 +0200 Subject: Fix compilation warning with GCC11. Parameter "header" of ssl3_cbc_digest_record was fixed to a 13 bytes header but used as a pointer. This caused a warning about out-of-bounds array access with GCC 11. Fixes #15462. Signed-off-by: Juergen Christ Reviewed-by: Tomas Mraz Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/15463) --- ssl/s3_cbc.c | 4 ++-- ssl/ssl_local.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ssl/s3_cbc.c b/ssl/s3_cbc.c index f5db247e92..8e1c779ddb 100644 --- a/ssl/s3_cbc.c +++ b/ssl/s3_cbc.c @@ -34,7 +34,7 @@ char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx); int ssl3_cbc_digest_record(const EVP_MD *md, unsigned char *md_out, size_t *md_out_size, - const unsigned char header[13], + const unsigned char *header, const unsigned char *data, size_t data_size, size_t data_plus_mac_plus_padding_size, @@ -156,7 +156,7 @@ static void tls1_sha512_final_raw(void *ctx, unsigned char *md_out) int ssl3_cbc_digest_record(const EVP_MD *md, unsigned char *md_out, size_t *md_out_size, - const unsigned char header[13], + const unsigned char *header, const unsigned char *data, size_t data_size, size_t data_plus_mac_plus_padding_size, diff --git a/ssl/ssl_local.h b/ssl/ssl_local.h index 8f3a2f93d6..28603a81ad 100644 --- a/ssl/ssl_local.h +++ b/ssl/ssl_local.h @@ -2770,7 +2770,7 @@ __owur char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx); __owur int ssl3_cbc_digest_record(const EVP_MD *md, unsigned char *md_out, size_t *md_out_size, - const unsigned char header[13], + const unsigned char *header, const unsigned char *data, size_t data_size, size_t data_plus_mac_plus_padding_size, -- cgit v1.2.3