mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-07-27 08:13:55 +00:00
Fix undefined behavior in mbedTLS transport log format specifiers (#1406)
* Fix undefined behavior in mbedTLS transport log statements * pNetworkContext now explicitly cast to void pointer * Delete personal fil
This commit is contained in:
@@ -659,7 +659,7 @@ static TlsTransportStatus_t initMbedtls( mbedtls_entropy_context * pEntropyConte
|
||||
|
||||
if( mbedtlsError != PSA_SUCCESS )
|
||||
{
|
||||
LogError( ( "Failed to initialize PSA Crypto implementation: %s", ( int ) mbedtlsError ) );
|
||||
LogError( ( "Failed to initialize PSA Crypto implementation: %d", ( int ) mbedtlsError ) );
|
||||
returnStatus = TLS_TRANSPORT_INTERNAL_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -832,8 +832,8 @@ void TLS_FreeRTOS_Disconnect( NetworkContext_t * pNetworkContext )
|
||||
/* WANT_READ and WANT_WRITE can be ignored. Logging for debugging purposes. */
|
||||
LogInfo( ( "(Network connection %p) TLS close-notify sent; "
|
||||
"received %s as the TLS status can be ignored for close-notify.",
|
||||
( tlsStatus == MBEDTLS_ERR_SSL_WANT_READ ) ? "WANT_READ" : "WANT_WRITE",
|
||||
pNetworkContext ) );
|
||||
( void * ) pNetworkContext,
|
||||
( tlsStatus == MBEDTLS_ERR_SSL_WANT_READ ) ? "WANT_READ" : "WANT_WRITE" ) );
|
||||
}
|
||||
|
||||
/* Call socket shutdown function to close connection. */
|
||||
|
||||
@@ -320,7 +320,7 @@ static TlsTransportStatus_t tlsSetup( NetworkContext_t * pNetworkContext,
|
||||
|
||||
if( mbedtlsError != PSA_SUCCESS )
|
||||
{
|
||||
LogError( ( "Failed to initialize PSA Crypto implementation: %s", ( int ) mbedtlsError ) );
|
||||
LogError( ( "Failed to initialize PSA Crypto implementation: %d", ( int ) mbedtlsError ) );
|
||||
returnStatus = TLS_TRANSPORT_INVALID_PARAMETER;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user