From af341d82c4edc830c9c1b0f91a16c3934d2fd08d Mon Sep 17 00:00:00 2001 From: Jim Rees Date: Thu, 15 Jul 2004 22:21:25 +0000 Subject: [PATCH] fix array index out of bounds in rpc->rc_srtt[], rpc->rc_sdrtt[] Noticed by: tedu Approved by: alfred --- sys/rpc/rpcclnt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/rpc/rpcclnt.c b/sys/rpc/rpcclnt.c index bb8768a604f..18c11b1fb6c 100644 --- a/sys/rpc/rpcclnt.c +++ b/sys/rpc/rpcclnt.c @@ -559,10 +559,10 @@ rpcclnt_connect(rpc, td) so->so_snd.sb_flags |= SB_NOINTR; /* Initialize other non-zero congestion variables */ - rpc->rc_srtt[0] = rpc->rc_srtt[1] = rpc->rc_srtt[2] = rpc->rc_srtt[3] = - rpc->rc_srtt[4] = (RPC_TIMEO << 3); + rpc->rc_srtt[0] = rpc->rc_srtt[1] = rpc->rc_srtt[2] = + rpc->rc_srtt[3] = (RPC_TIMEO << 3); rpc->rc_sdrtt[0] = rpc->rc_sdrtt[1] = rpc->rc_sdrtt[2] = - rpc->rc_sdrtt[3] = rpc->rc_sdrtt[4] = 0; + rpc->rc_sdrtt[3] = 0; rpc->rc_cwnd = RPC_MAXCWND / 2; /* Initial send window */ rpc->rc_sent = 0; rpc->rc_timeouts = 0;