mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-23 16:51:08 +00:00
Fix GCC warning in ssl_calc_finished_tls_sha384
GCC 11 generated a warning because `padbuf` was too small to be used as an argument for `mbedtls_sha512_finish_ret`. The `output` parameter of `mbedtls_sha512_finish_ret` has the type `unsigned char[64]`, but `padbuf` was only 48 bytes long. Even though `ssl_calc_finished_tls_sha384` uses only 48 bytes for the hash output, the size of `padbuf` was increased to 64 bytes. Signed-off-by: Rodrigo Dias Correa <rodrigo@correas.us>
This commit is contained in:
parent
5fb1bd487d
commit
34018bef3d
|
@ -5411,7 +5411,7 @@ static void ssl_calc_finished_tls_sha384(
|
||||||
int len = 12;
|
int len = 12;
|
||||||
const char *sender;
|
const char *sender;
|
||||||
mbedtls_sha512_context sha512;
|
mbedtls_sha512_context sha512;
|
||||||
unsigned char padbuf[48];
|
unsigned char padbuf[64];
|
||||||
|
|
||||||
mbedtls_ssl_session *session = ssl->session_negotiate;
|
mbedtls_ssl_session *session = ssl->session_negotiate;
|
||||||
if( !session )
|
if( !session )
|
||||||
|
|
Loading…
Reference in a new issue