From 7ca719deef46fd59ae175e145df73f9751a5c572 Mon Sep 17 00:00:00 2001 From: Jan Venekamp <1422460+jan2000@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:33:59 +0200 Subject: [PATCH] mbedtls: fix incorrect macro condition mbed_dump_cert_info Follow-up to 88cae145509c7 --- lib/vtls/mbedtls.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vtls/mbedtls.c b/lib/vtls/mbedtls.c index 1cf7c04697..1c00cbe1d7 100644 --- a/lib/vtls/mbedtls.c +++ b/lib/vtls/mbedtls.c @@ -488,7 +488,7 @@ add_ciphers: static void mbed_dump_cert_info(struct Curl_easy *data, const mbedtls_x509_crt *crt) { -#if !defined(CURL_DISABLE_VERBOSE_STRINGS) || \ +#if defined(CURL_DISABLE_VERBOSE_STRINGS) || \ (MBEDTLS_VERSION_NUMBER >= 0x03000000 && defined(MBEDTLS_X509_REMOVE_INFO)) (void) data, (void) crt; #else @@ -497,7 +497,7 @@ mbed_dump_cert_info(struct Curl_easy *data, const mbedtls_x509_crt *crt) if(buffer && mbedtls_x509_crt_info(buffer, bufsize, " ", crt) > 0) { infof(data, "Server certificate:"); - for(p = buffer; *p; *p && p++) { + for(p = buffer; *p; p += *p != '\0') { size_t s = strcspn(p, "\n"); infof(data, "%.*s", (int) s, p); p += s; -- 2.47.3