From 8265037c925255dbc8259b79db94eb4ae987aa31 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Wed, 15 Jun 1994 00:43:00 +0000 Subject: [PATCH] fixing memory scribbling in find_alternate_tgs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3790 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kdc/do_tgs_req.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index a111b0fc7..a96756e19 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -666,7 +666,7 @@ int *nprincs; { krb5_error_code retval; krb5_principal *plist, *pl2; - krb5_data *tmp; + krb5_data tmp; *nprincs = 0; *more = FALSE; @@ -683,10 +683,10 @@ int *nprincs; ignore it */ while (--pl2 > plist) { *nprincs = 1; - tmp = krb5_princ_realm(*pl2); + tmp = *krb5_princ_realm(*pl2); krb5_princ_set_realm(*pl2, krb5_princ_realm(tgs_server)); retval = krb5_db_get_principal(*pl2, server, nprincs, more); - krb5_princ_set_realm(*pl2, tmp); + krb5_princ_set_realm(*pl2, &tmp); if (retval) { *nprincs = 0; *more = FALSE; @@ -701,14 +701,14 @@ int *nprincs; krb5_principal tmpprinc; char *sname; - tmp = krb5_princ_realm(*pl2); + tmp = *krb5_princ_realm(*pl2); krb5_princ_set_realm(*pl2, krb5_princ_realm(tgs_server)); if (retval = krb5_copy_principal(*pl2, &tmpprinc)) { krb5_db_free_principal(server, *nprincs); - krb5_princ_set_realm(*pl2, tmp); + krb5_princ_set_realm(*pl2, &tmp); continue; } - krb5_princ_set_realm(*pl2, tmp); + krb5_princ_set_realm(*pl2, &tmp); krb5_free_principal(request->server); request->server = tmpprinc; -- 2.26.2