1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-28 00:21:48 +03:00

library: debug: improve input param check in mbedtls_debug_print_psa_rsa()

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti
2025-06-19 23:56:09 +02:00
parent 0c92466bb0
commit 069617fdce

View File

@ -333,6 +333,13 @@ static void mbedtls_debug_print_psa_rsa(const mbedtls_ssl_context *ssl, int leve
size_t len, bits;
int ret;
if (NULL == ssl ||
NULL == ssl->conf ||
NULL == ssl->conf->f_dbg ||
level > debug_threshold) {
return;
}
if (pk->pub_raw_len > sizeof(key_der)) {
return;
}