+Fri Oct 4 08:40:21 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * svr_principal.c (kadm5_get_principal): Do not assume malloc(0)
+ returns non-NULL. [krb5-admin/46]
+
Fri Aug 2 14:07:31 1996 Barry Jaspan <bjaspan@DUN-DUN-NOODLES>
* svr_principal.c: remove krb5_free_keyblock_contents (moved to
}
if (mask & KADM5_KEY_DATA) {
entry->n_key_data = kdb.n_key_data;
- entry->key_data = (krb5_key_data *)
- malloc(entry->n_key_data*sizeof(krb5_key_data));
- if (entry->key_data == NULL) {
- ret = ENOMEM;
- goto done;
- }
+ if(entry->n_key_data) {
+ entry->key_data = (krb5_key_data *)
+ malloc(entry->n_key_data*sizeof(krb5_key_data));
+ if (entry->key_data == NULL) {
+ ret = ENOMEM;
+ goto done;
+ }
+ } else
+ entry->key_data = NULL;
+
for (i = 0; i < entry->n_key_data; i++)
if (ret = krb5_copy_key_data_contents(handle->context,
&kdb.key_data[i],