Don't include nul characters in the text we send with krb-error
authorGreg Hudson <ghudson@mit.edu>
Mon, 24 May 2010 03:14:57 +0000 (03:14 +0000)
committerGreg Hudson <ghudson@mit.edu>
Mon, 24 May 2010 03:14:57 +0000 (03:14 +0000)
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
src/kdc/do_tgs_req.c

index 39242979aa3c8944123a29dc5b6d00f295dad18f..9ceac84aaf24e700837c0a2b704ecc5c7053a70e 100644 (file)
@@ -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;
 
index 29546bd250ee6fc52b40def9a24702ce09fdf366..f1ae84b97cee32f842631507fb0f78f6a6b7c6b1 100644 (file)
@@ -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;