diff --git a/library/ssl_tls12_server.c b/library/ssl_tls12_server.c index b46c39f166..7bf35694ff 100644 --- a/library/ssl_tls12_server.c +++ b/library/ssl_tls12_server.c @@ -4081,7 +4081,8 @@ static int ssl_parse_client_key_exchange( mbedtls_ssl_context *ssl )  * - the PSK itself  */ unsigned char *psm = ssl->handshake->premaster; - unsigned char *psm_end = psm + sizeof( ssl->handshake->premaster ); + const unsigned char* const psm_end = + psm + sizeof( ssl->handshake->premaster ); size_t zlen = 0; /* Compute ECDH shared secret. */