From 40b598289f8d132eff2b46d1f5f8de388d6fc65b Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Wed, 17 May 2023 01:06:17 -0500 Subject: [PATCH] src/ssl_asn1.c: in wolfssl_asn1_time_to_tm(), initialize localTm with memset, not the zero initializer, for C++ compatibility. --- src/ssl_asn1.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ssl_asn1.c b/src/ssl_asn1.c index 20dbe6758..5c5d90685 100644 --- a/src/ssl_asn1.c +++ b/src/ssl_asn1.c @@ -3653,7 +3653,9 @@ static int wolfssl_asn1_time_to_tm(const WOLFSSL_ASN1_TIME* asnTime, int asn1TimeBufLen; int i = 0; #ifdef XMKTIME - struct tm localTm = {0}; + struct tm localTm; + + XMEMSET(&localTm, 0, sizeof localTm); #endif /* Get the string buffer - fixed array, can't fail. */