summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2003-07-26 07:23:24 +0000
committerScott Long <scottl@FreeBSD.org>2003-07-26 07:23:24 +0000
commitc43cad1ac1170125770d9c4a76878507c3d8bb6e (patch)
tree9bbbc04e2d34587e5e951ada2be11a52a0fbb5ae
parent2272d4a4cb3ba304802faeef055e79ac35dbcb59 (diff)
Notes
-rw-r--r--sys/kern/uipc_sockbuf.c2
-rw-r--r--sys/kern/uipc_socket2.c2
-rw-r--r--sys/kern/vfs_export.c2
3 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c
index b0d366a4dcf0..6feeb917fbcb 100644
--- a/sys/kern/uipc_sockbuf.c
+++ b/sys/kern/uipc_sockbuf.c
@@ -626,8 +626,10 @@ sbappendaddr(sb, asa, m0, control)
space += m_length(control, &n);
if (space > sbspace(sb))
return (0);
+#if MSIZE <= 256
if (asa->sa_len > MLEN)
return (0);
+#endif
MGET(m, M_DONTWAIT, MT_SONAME);
if (m == 0)
return (0);
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index b0d366a4dcf0..6feeb917fbcb 100644
--- a/sys/kern/uipc_socket2.c
+++ b/sys/kern/uipc_socket2.c
@@ -626,8 +626,10 @@ sbappendaddr(sb, asa, m0, control)
space += m_length(control, &n);
if (space > sbspace(sb))
return (0);
+#if MSIZE <= 256
if (asa->sa_len > MLEN)
return (0);
+#endif
MGET(m, M_DONTWAIT, MT_SONAME);
if (m == 0)
return (0);
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index b1a536b4dcde..7609ac06a2cc 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -120,8 +120,10 @@ vfs_hang_addrlist(mp, nep, argp)
return (0);
}
+#if MSIZE <= 256
if (argp->ex_addrlen > MLEN)
return (EINVAL);
+#endif
i = sizeof(struct netcred) + argp->ex_addrlen + argp->ex_masklen;
np = (struct netcred *) malloc(i, M_NETADDR, M_WAITOK | M_ZERO);