]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:passdb: Initialize ‘tm’ structure
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 20 Sep 2023 05:05:21 +0000 (17:05 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 27 Sep 2023 02:43:28 +0000 (02:43 +0000)
‘tm’ must be initialized prior to calling strptime().

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/passdb/pdb_ldap.c

index ed682de47ea8cffc6f56d89aa23a76ea810b7dff..160d624a8357f25010a72aa6233ac31a0586ae08 100644 (file)
@@ -441,7 +441,7 @@ static int ldapsam_delete_entry(struct ldapsam_privates *priv,
 static time_t ldapsam_get_entry_timestamp( struct ldapsam_privates *ldap_state, LDAPMessage * entry)
 {
        char *temp;
-       struct tm tm;
+       struct tm tm = {};
 
        temp = smbldap_talloc_single_attribute(
                smbldap_get_ldap(ldap_state->smbldap_state), entry,