summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1999-11-22 04:50:09 +0000
committerdillon <dillon@FreeBSD.org>1999-11-22 04:50:09 +0000
commit913c1ce7346351f8ee703d9125f82353999c9d0a (patch)
tree1f91e1a8fce55a0023cb7d1302af68f55f3ef607 /sys/nfsclient
parenta3ca1bca0f456af9fbb316a5621b5ea6ad7bcfba (diff)
downloadFreeBSD-src-913c1ce7346351f8ee703d9125f82353999c9d0a.zip
FreeBSD-src-913c1ce7346351f8ee703d9125f82353999c9d0a.tar.gz
nm_srtt and nm_sdrtt are arrays[4]. Remove explicit initialization
of element [4] in both, which goes beyond the end of the array, leaving [0], [1], [2], and [3]. This bug did not cause any problems since the overrun fields are initialized after the bogus array init but needs to be fixed anyway. Submitted by: Ian Dowse <iedowse@maths.tcd.ie>
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/nfs_socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c
index f7204b5..0b314b1 100644
--- a/sys/nfsclient/nfs_socket.c
+++ b/sys/nfsclient/nfs_socket.c
@@ -347,10 +347,10 @@ nfs_connect(nmp, rep)
so->so_snd.sb_flags |= SB_NOINTR;
/* Initialize other non-zero congestion variables */
- nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] = nmp->nm_srtt[3] =
- nmp->nm_srtt[4] = (NFS_TIMEO << 3);
+ nmp->nm_srtt[0] = nmp->nm_srtt[1] = nmp->nm_srtt[2] =
+ nmp->nm_srtt[3] = (NFS_TIMEO << 3);
nmp->nm_sdrtt[0] = nmp->nm_sdrtt[1] = nmp->nm_sdrtt[2] =
- nmp->nm_sdrtt[3] = nmp->nm_sdrtt[4] = 0;
+ nmp->nm_sdrtt[3] = 0;
nmp->nm_cwnd = NFS_MAXCWND / 2; /* Initial send window */
nmp->nm_sent = 0;
nmp->nm_timeouts = 0;
OpenPOWER on IntegriCloud