From d8420cad316b2c9868674b9fc7fdca0ecc9477ce Mon Sep 17 00:00:00 2001 From: Neil Armstrong Date: Wed, 23 Mar 2022 17:46:04 +0100 Subject: [PATCH] Change to more appropriate pointer declaration in ECHDE-PSK part of ssl_write_client_key_exchange() Signed-off-by: Neil Armstrong --- library/ssl_tls12_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/ssl_tls12_client.c b/library/ssl_tls12_client.c index 895896c9f2..91cad8b293 100644 --- a/library/ssl_tls12_client.c +++ b/library/ssl_tls12_client.c @@ -3096,7 +3096,8 @@ ecdh_calc_secret: * - the PSK itself */ unsigned char *p = ssl->handshake->premaster; - unsigned char *p_end = p + sizeof( ssl->handshake->premaster ); + const unsigned char* const p_end = p + + sizeof( ssl->handshake->premaster ); size_t zlen = 0; /* Perform ECDH computation after the uint16 reserved for the length */