From 614f9d1d7e1053f4d1c0069d0e51367c4a96829a Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Sun, 15 Oct 2006 07:51:30 +0000 Subject: [PATCH] Clear req_st buffer before filling it in git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18706 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb4/mk_req.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/krb4/mk_req.c b/src/lib/krb4/mk_req.c index 3066f43d7..fc92c58e6 100644 --- a/src/lib/krb4/mk_req.c +++ b/src/lib/krb4/mk_req.c @@ -103,6 +103,10 @@ krb_mk_req_creds_prealm(authent, creds, checksum, myrealm) unsigned KRB4_32 time_secs; unsigned KRB4_32 time_usecs; + /* Don't risk exposing stack garbage to correspondent, even if + encrypted from other prying eyes. */ + memset(&req_st, 0x69, sizeof(req_st)); + ticket = &creds->ticket_st; /* Get the ticket and move it into the authenticator */ if (krb_ap_req_debug) -- 2.26.2