mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-11 11:05:39 +00:00
Move misplaced comment
Signed-off-by: Hanno Becker <hanno.becker@arm.com>
This commit is contained in:
parent
0973ff9545
commit
97a21567df
|
@ -254,13 +254,15 @@ int mbedtls_ssl_tls1_3_derive_secret(
|
||||||
clen = mbedtls_md_get_size( md );
|
clen = mbedtls_md_get_size( md );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if( clen > sizeof(hashed_context) )
|
||||||
{
|
{
|
||||||
/* This should never happen since this function is internal
|
/* This should never happen since this function is internal
|
||||||
* and the code sets `context_already_hashed` correctly.
|
* and the code sets `context_already_hashed` correctly.
|
||||||
* Let's double-check nonetheless to not run at the risk
|
* Let's double-check nonetheless to not run at the risk
|
||||||
* of getting a stack overflow. */
|
* of getting a stack overflow. */
|
||||||
if( clen > sizeof(hashed_context) )
|
|
||||||
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
return( MBEDTLS_ERR_SSL_INTERNAL_ERROR );
|
||||||
|
}
|
||||||
|
|
||||||
memcpy( hashed_context, ctx, clen );
|
memcpy( hashed_context, ctx, clen );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue