hdb: Initialize ‘tm’ structure
‘tm’ must be initialized prior to calling strptime(). Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
This commit is contained in:

committed by
Nico Williams

parent
f7bcd8665c
commit
806bf5f571
@@ -366,6 +366,7 @@ LDAP_get_generalized_time_value(HDB * db, LDAPMessage * entry,
|
|||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
memset(&tm, 0, sizeof tm);
|
||||||
tmp = strptime(gentime, "%Y%m%d%H%M%SZ", &tm);
|
tmp = strptime(gentime, "%Y%m%d%H%M%SZ", &tm);
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
free(gentime);
|
free(gentime);
|
||||||
|
Reference in New Issue
Block a user