From 6cbe35ad5dd1ce3a4fca5ae01ed1bddb32e7ad7c Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Sat, 30 Oct 2021 00:42:02 -0500 Subject: [PATCH] kadm5: Fix crash in principal creation This manifests with an upcomming patch that adds support for aliasing of namespaces. --- lib/kadm5/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kadm5/log.c b/lib/kadm5/log.c index c041e3f43..376cecd9e 100644 --- a/lib/kadm5/log.c +++ b/lib/kadm5/log.c @@ -977,11 +977,11 @@ kadm5_log_create(kadm5_server_context *context, hdb_entry *entry) hdb_entry_ex ent, existing; kadm5_log_context *log_context = &context->log_context; + memset(&existing, 0, sizeof(existing)); memset(&ent, 0, sizeof(ent)); ent.ctx = 0; ent.free_entry = 0; ent.entry = *entry; - existing = ent; /* * Do not allow creation of concrete entries within namespaces unless