From: Greg Hudson Date: Mon, 24 May 2010 03:14:57 +0000 (+0000) Subject: Don't include nul characters in the text we send with krb-error X-Git-Tag: krb5-1.9-beta1~214 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df513e286693e698553ec025fee4ebcff500d408;p=krb5.git Don't include nul characters in the text we send with krb-error responses from the KDC. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24097 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 39242979a..9ceac84aa 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -750,7 +750,7 @@ prepare_error_as (struct kdc_request_state *rstate, krb5_kdc_req *request, errpkt.client = canon_client; else errpkt.client = request->client; - errpkt.text.length = strlen(status) + 1; + errpkt.text.length = strlen(status); if (!(errpkt.text.data = strdup(status))) return ENOMEM; diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index 29546bd25..f1ae84b97 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -1078,7 +1078,7 @@ prepare_error_tgs (struct kdc_request_state *state, errpkt.client = ticket->enc_part2->client; else errpkt.client = NULL; - errpkt.text.length = strlen(status) + 1; + errpkt.text.length = strlen(status); if (!(errpkt.text.data = strdup(status))) return ENOMEM;