summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-01-04 16:03:01 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2000-01-04 16:03:01 +0000
commit9c90131ce98bee1a3d3dd773429cb3b5d423efe2 (patch)
tree2652e2f3c8fab646878cb57c563ca8db7998efad
parent0e98b941a1bd23e6cdc5cfc7c68e38f34c30e037 (diff)
fix mbuf out-of-bound writes on nfsv2 mounts.
netbsd sys/nfs/nfs_socket.c 1.43 -> 1.44
-rw-r--r--sys/nfs/nfs_socket.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c
index 7e5c6540813..197ccc61bdd 100644
--- a/sys/nfs/nfs_socket.c
+++ b/sys/nfs/nfs_socket.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_socket.c,v 1.15 1999/03/02 20:59:55 millert Exp $ */
+/* $OpenBSD: nfs_socket.c,v 1.16 2000/01/04 16:03:00 itojun Exp $ */
/* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */
/*
@@ -1115,7 +1115,7 @@ nfs_rephead(siz, nd, slp, err, cache, frev, mrq, mbp, bposp)
* try and leave leading space for the lower level headers.
*/
siz += RPC_REPLYSIZ;
- if (siz >= MINCLSIZE) {
+ if (siz >= max_datalen) {
MCLGET(mreq, M_WAIT);
} else
mreq->m_data += max_hdr;