mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-11-08 06:42:24 +03:00
The debugging functions - mbedtls_debug_print_ret, - mbedtls_debug_print_buf, - mbedtls_debug_print_mpi, and - mbedtls_debug_print_crt return immediately if the SSL configuration bound to the passed SSL context is NULL, has no debugging functions configured, or if the debug threshold is below the debugging level. However, they do not check whether the provided SSL context is not NULL before accessing the SSL configuration bound to it, therefore leading to a segmentation fault if it is. In contrast, the debugging function - mbedtls_debug_print_msg does check for ssl != NULL before accessing ssl->conf. This commit unifies the checks by always returning immediately if ssl == NULL.
11 KiB
11 KiB