Skip to content

Commit

Permalink
mbedtls: Fix enable dynamic mbedtls will occur heap corruption when s…
Browse files Browse the repository at this point in the history
…erver support TLS renegotiation
  • Loading branch information
ESP-YJM committed Jan 8, 2024
1 parent 209a036 commit dfe28ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/mbedtls/port/dynamic/esp_ssl_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ static int manage_resource(mbedtls_ssl_context *ssl, bool add)
case MBEDTLS_SSL_FLUSH_BUFFERS:
break;
case MBEDTLS_SSL_HANDSHAKE_WRAPUP:
#if defined(MBEDTLS_SSL_RENEGOTIATION)
if (add && ssl->MBEDTLS_PRIVATE(renego_status)) {
CHECK_OK(esp_mbedtls_add_rx_buffer(ssl));
}
#endif
break;
default:
break;
Expand Down

0 comments on commit dfe28ce

Please sign in to comment.