(as_rep): be paranoid and check krb5_enctype_to_string for failure,

noted by <lha@stacken.kth.se>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9553 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2001-01-28 22:57:47 +00:00
parent a2baf81cbe
commit 81fbeb826f

View File

@@ -647,11 +647,17 @@ as_rep(KDC_REQ *req,
{
char *cet;
char *set;
krb5_enctype_to_string(context, cetype, &cet);
krb5_enctype_to_string(context, setype, &set);
kdc_log(5, "Using %s/%s", cet, set);
free(cet);
free(set);
ret = krb5_enctype_to_string(context, cetype, &cet);
if(ret == 0) {
ret = krb5_enctype_to_string(context, setype, &set);
if (ret == 0) {
kdc_log(5, "Using %s/%s", cet, set);
free(set);
} else
free(cet);
} else
kdc_log(5, "Using e-types %d/%d", cetype, setype);
}
{