From: Theodore Tso Date: Tue, 25 Nov 1997 01:03:03 +0000 (+0000) Subject: do_tgs_req.c (process_tgs_req): Add check to make sure cname and sname X-Git-Tag: krb5-1.1-beta1~933 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=af62b4428ac36228e5b8c67939a8782294636e64;p=krb5.git do_tgs_req.c (process_tgs_req): Add check to make sure cname and sname are non-NULL when syslogging an error because the principals don't match. kdc_util.c (limit_string): Check to make sure the input string is non-NULL before operating on it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10307 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 674fcc9fd..ab5a7b0f7 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,12 @@ +Mon Nov 24 19:57:48 1997 Theodore Y. Ts'o + + * do_tgs_req.c (process_tgs_req): Add check to make sure cname and + sname are non-NULL when syslogging an error because the + principals don't match. + + * kdc_util.c (limit_string): Check to make sure the input string + is non-NULL before operating on it. + Thu Nov 13 20:40:01 1997 Theodore Y. Ts'o * do_tgs_req.c (process_tgs_req): Only try to return a TGT for a diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index 8f1237a2f..f0b6d8b1c 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -527,7 +527,9 @@ tgt_again: &tmp))) tmp = 0; krb5_klog_syslog(LOG_INFO, "TGS_REQ %s(%d): 2ND_TKT_MISMATCH: authtime %d, %s for %s, 2nd tkt client %s", - fromstring, portnum, authtime, cname, sname, + fromstring, portnum, authtime, + cname ? cname : "", + sname ? sname : "", tmp ? tmp : ""); goto cleanup; } diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c index 5e5ce0a85..ac969841a 100644 --- a/src/kdc/kdc_util.c +++ b/src/kdc/kdc_util.c @@ -1405,6 +1405,9 @@ void limit_string(char *name) { int i; + if (!name) + return; + if (strlen(name) < NAME_LENGTH_LIMIT) return;