From 806bf5f57148f48125740ffa219c5be34e3fb8c2 Mon Sep 17 00:00:00 2001 From: Joseph Sutton Date: Thu, 21 Sep 2023 09:08:16 +1200 Subject: [PATCH] =?UTF-8?q?hdb:=20Initialize=20=E2=80=98tm=E2=80=99=20stru?= =?UTF-8?q?cture?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ‘tm’ must be initialized prior to calling strptime(). Signed-off-by: Joseph Sutton --- lib/hdb/hdb-ldap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/hdb/hdb-ldap.c b/lib/hdb/hdb-ldap.c index 5cd097f5b..902426d12 100644 --- a/lib/hdb/hdb-ldap.c +++ b/lib/hdb/hdb-ldap.c @@ -366,6 +366,7 @@ LDAP_get_generalized_time_value(HDB * db, LDAPMessage * entry, if (ret) return ret; + memset(&tm, 0, sizeof tm); tmp = strptime(gentime, "%Y%m%d%H%M%SZ", &tm); if (tmp == NULL) { free(gentime);