From aaa792bc173ec8415f1fd7df597187425e41c5d1 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 4 Sep 2007 02:10:13 +0000 Subject: [PATCH] Bail out if encoded "ticket" doesn't decode correctly. This allows t_cc test case to pass and allows non-tickets to be stored (for now). ticket: 5697 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19910 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/ccache/ccfns.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/ccache/ccfns.c b/src/lib/krb5/ccache/ccfns.c index f44c0fe6c..15bc87df6 100644 --- a/src/lib/krb5/ccache/ccfns.c +++ b/src/lib/krb5/ccache/ccfns.c @@ -78,7 +78,8 @@ krb5_cc_store_cred (krb5_context context, krb5_ccache cache, */ s1 = creds->server; ret = decode_krb5_ticket(&creds->ticket, &tkt); - if (ret) return ret; + /* Bail out on errors in case someone is storing a non-ticket. */ + if (ret) return 0; s2 = tkt->server; if (!krb5_principal_compare(context, s1, s2)) { creds->server = s2; -- 2.26.2