From df513e286693e698553ec025fee4ebcff500d408 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Mon, 24 May 2010 03:14:57 +0000 Subject: [PATCH] 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 --- src/kdc/do_as_req.c | 2 +- src/kdc/do_tgs_req.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.26.2