From: Sam Hartman Date: Mon, 28 Oct 2002 02:28:41 +0000 (+0000) Subject: Don't include trailing null in the transited encoding produced by the KDC. X-Git-Tag: krb5-1.3-alpha1~311 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a440f29da8a078c940fd226f29dc3f5f8d061cc0;p=krb5.git Don't include trailing null in the transited encoding produced by the KDC. Other routines do not expect the null to be included in the length so policy checks fail. Also, sending the null over the wire is wrong. ticket: 1230 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14940 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 4823515cc..1bdd8bcc6 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,7 @@ +2002-10-27 Sam Hartman + + * kdc_util.c (add_to_transited): Don't include trailing null in transited encoding length; doing so breaks using codee + 2002-10-05 Tom Yu * do_as_req.c (process_as_req): Apply fix from Kevin Coffman to diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c index 6dff24189..736c51d12 100644 --- a/src/kdc/kdc_util.c +++ b/src/kdc/kdc_util.c @@ -783,7 +783,7 @@ add_to_transited(krb5_data *tgt_trans, krb5_data *new_trans, goto fail; } strcat(trans, current); - new_trans->length = strlen(trans) + 1; + new_trans->length = strlen(trans); strncpy(prev, exp, sizeof(prev) - 1); prev[sizeof(prev) - 1] = '\0'; @@ -811,7 +811,7 @@ add_to_transited(krb5_data *tgt_trans, krb5_data *new_trans, goto fail; } strcat(trans, realm); - new_trans->length = strlen(trans) + 1; + new_trans->length = strlen(trans); } retval = 0;