From 24213f87b8a6e1aba53bd464c722b9789d846c05 Mon Sep 17 00:00:00 2001 From: Andrea Calabrese Date: Mon, 13 Jul 2026 12:09:39 +0200 Subject: [PATCH] x509_crt: Add initialization to time `now` When creating time `now`, it is not initialized. This leads to an error when building the project using -WError. This patch fixes this issue Signed-off-by: Andrea Calabrese --- library/x509_crt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/x509_crt.c b/library/x509_crt.c index f9e36470cb..f2a252639f 100644 --- a/library/x509_crt.c +++ b/library/x509_crt.c @@ -2530,7 +2530,7 @@ static int x509_crt_verify_chain( int signature_is_good; unsigned self_cnt; mbedtls_x509_crt *cur_trust_ca = NULL; - mbedtls_x509_time now; + mbedtls_x509_time now = {}; #if defined(MBEDTLS_HAVE_TIME_DATE) if (mbedtls_x509_time_gmtime(mbedtls_time(NULL), &now) != 0) {