summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThordur I. Bjornsson <thib@cvs.openbsd.org>2006-10-28 20:56:47 +0000
committerThordur I. Bjornsson <thib@cvs.openbsd.org>2006-10-28 20:56:47 +0000
commit15046173c609145fe01171cd421fc7a14f588a62 (patch)
treea3e93b7ad6d1eb7deac59d9dcba79ecd58981484
parentb57abeba517dec5f059cadeb472c20839a31659f (diff)
Dont initialize the nm_srtt and nm_sdrtt arrays
out of bounds. ok pedro@
-rw-r--r--sys/nfs/nfs_socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index cb0416b45d8..1f3fbb67628 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.45 2006/09/20 21:56:21 thib Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.46 2006/10/28 20:56:46 thib Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -283,10 +283,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;