hdb: ensure Salt is zero'd in add_default_salts()

Ensure Salt is zero'd in add_default_salts(), as the structure has members
other than the salt type and value.
This commit is contained in:
Luke Howard
2019-01-07 18:07:53 +11:00
parent ff21a49cb0
commit 5abb68c891

View File

@@ -123,7 +123,7 @@ add_default_salts(krb5_context context, HDB *db, hdb_entry *entry)
_krb5_enctype_requires_random_salt(context, key->key.keytype))
continue;
key->salt = malloc(sizeof(*key->salt));
key->salt = calloc(1, sizeof(*key->salt));
if (key->salt == NULL) {
ret = krb5_enomem(context);
break;