src/ssl_asn1.c: in wolfssl_asn1_time_to_tm(), initialize localTm with memset, not the zero initializer, for C++ compatibility.

pull/6418/head
Daniel Pouzzner 2023-05-17 01:06:17 -05:00
parent 85e0bf337b
commit 40b598289f
1 changed files with 3 additions and 1 deletions

View File

@ -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. */