diff --git a/mongoose.c b/mongoose.c index 3cf96363..1c20636e 100644 --- a/mongoose.c +++ b/mongoose.c @@ -9501,8 +9501,7 @@ static uint8_t zeros_sha256_digest[32] = { // helper to hexdump buffers inline static void mg_tls_hexdump(const char *msg, uint8_t *buf, size_t bufsz) { - char p[8 * 4096]; - MG_VERBOSE(("%s: %s", msg, mg_hex(buf, bufsz, p))); + MG_VERBOSE(("%s: %M", msg, mg_print_hex, bufsz, buf)); } // helper utilities to parse ASN.1 DER diff --git a/src/tls_builtin.c b/src/tls_builtin.c index cc0e16fd..781fdb9d 100644 --- a/src/tls_builtin.c +++ b/src/tls_builtin.c @@ -127,8 +127,7 @@ static uint8_t zeros_sha256_digest[32] = { // helper to hexdump buffers inline static void mg_tls_hexdump(const char *msg, uint8_t *buf, size_t bufsz) { - char p[8 * 4096]; - MG_VERBOSE(("%s: %s", msg, mg_hex(buf, bufsz, p))); + MG_VERBOSE(("%s: %M", msg, mg_print_hex, bufsz, buf)); } // helper utilities to parse ASN.1 DER