tls12: srv: Use sizeof() instead of constant

Signed-off-by: Ronald Cron <ronald.cron@arm.com>
This commit is contained in:
Ronald Cron 2023-04-06 09:56:53 +02:00
parent c564938180
commit fe01ec2d57

View file

@ -2234,7 +2234,8 @@ static int ssl_write_server_hello(mbedtls_ssl_context *ssl)
sizeof(magic_tls12_downgrade_string) == 8,
"magic_tls12_downgrade_string does not have the expected size");
memcpy(p, magic_tls12_downgrade_string, 8);
memcpy(p, magic_tls12_downgrade_string,
sizeof(magic_tls12_downgrade_string));
} else
#endif
{