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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user