library: debug: fix print format in mbedtls_debug_print_buf_ext()

%zu creates problem in MinGW testing. Use MBEDTLS_PRINTF_SIZET intead.

Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
Valerio Setti
2025-12-18 14:56:59 +01:00
parent d040eb823e
commit 2af638a177
2 changed files with 5 additions and 2 deletions

View File

@@ -154,12 +154,13 @@ static void mbedtls_debug_print_buf_ext(const mbedtls_ssl_context *ssl, int leve
return;
}
mbedtls_snprintf(str, sizeof(str), "dumping '%s' (%zu bytes)\n", text, len);
mbedtls_snprintf(str, sizeof(str), "dumping '%s' (%" MBEDTLS_PRINTF_SIZET " bytes)\n",
text, len);
debug_send_line(ssl, level, file, line, str);
while (len > 0) {
memset(str, 0, sizeof(str));
idx = mbedtls_snprintf(str, sizeof(str), "%04zx: ", curr_offset);
idx = mbedtls_snprintf(str, sizeof(str), "%04" MBEDTLS_PRINTF_SIZET_HEX ": ", curr_offset);
chunk_len = (len >= 16) ? 16 : len;
mbedtls_debug_print_buf_one_line(str + idx, sizeof(str) - idx,
&buf[curr_offset], chunk_len,