From 6a9a9bb932618347a0d84c2f79f3244988d67590 Mon Sep 17 00:00:00 2001 From: "U-fast\\aglo" Date: Tue, 14 Jun 2011 11:33:03 -0400 Subject: [PATCH] [libtirpc] fixing infinite loop in autherr refreshes if not static was causing infinite recursive calling. --- libtirpc/src/clnt_vc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtirpc/src/clnt_vc.c b/libtirpc/src/clnt_vc.c index 5cb7be6..b06b246 100644 --- a/libtirpc/src/clnt_vc.c +++ b/libtirpc/src/clnt_vc.c @@ -498,7 +498,7 @@ clnt_vc_call(cl, proc, xdr_args, args_ptr, xdr_results, results_ptr, timeout) u_int32_t x_id; u_int32_t *msg_x_id = &ct->ct_u.ct_mcalli; /* yuk */ bool_t shipnow; - int refreshes = 2; + static int refreshes = 2; u_int seq = -1; time_t start_send, time_now; #ifndef _WIN32 @@ -663,7 +663,7 @@ call_again: &(ct->reply_msg.acpted_rply.ar_verf)); } /* maybe our credentials need to be refreshed ... */ - if (refreshes-- && AUTH_REFRESH(cl->cl_auth, &ct->reply_msg)) + if (refreshes-- > 0 && AUTH_REFRESH(cl->cl_auth, &ct->reply_msg)) goto call_again; } /* end of unsuccessful completion */ ct->reply_msg.rm_direction = -1;