mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +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:
@ -333,6 +333,13 @@ static void mbedtls_debug_print_psa_rsa(const mbedtls_ssl_context *ssl, int leve
|
|||||||
size_t len, bits;
|
size_t len, bits;
|
||||||
int ret;
|
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)) {
|
if (pk->pub_raw_len > sizeof(key_der)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user