From 6f070d95ceda074a2f06dc65f2659dde3842510d Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Fri, 1 Oct 1999 15:16:41 +0000 Subject: [PATCH] (add_one_principal): `password' can cactually be NULL in the overwrite code, check for it. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7070 ec53bebd-3082-4978-b11e-865c3cabbd6b --- kadmin/ank.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kadmin/ank.c b/kadmin/ank.c index b3d70bd44..52b49e18f 100644 --- a/kadmin/ank.c +++ b/kadmin/ank.c @@ -169,7 +169,8 @@ out: krb5_free_principal (context, princ_ent); if(default_ent) kadm5_free_principal_ent (context, default_ent); - memset (password, 0, strlen(password)); + if (password != NULL) + memset (password, 0, strlen(password)); return ret; }