hdb: Fix warnings and leaks

This commit is contained in:
Nicolas Williams
2021-03-28 17:55:14 -05:00
parent fb553dde1d
commit 4f8399a433
9 changed files with 44 additions and 30 deletions

View File

@@ -1172,6 +1172,11 @@ LDAP_message2entry(krb5_context context, HDB * db, LDAPMessage * msg,
ret = hex_decode(ntPasswordIN,
ent->entry.keys.val[ent->entry.keys.len].key.keyvalue.data, 16);
ent->entry.keys.len++;
if (ret == -1) {
krb5_set_error_message(context, ret = EINVAL,
"invalid hex encoding of password");
goto out;
}
if (ent->entry.etypes == NULL) {
ent->entry.etypes = malloc(sizeof(*(ent->entry.etypes)));