summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_socket2.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2003-07-26 07:23:24 +0000
committerscottl <scottl@FreeBSD.org>2003-07-26 07:23:24 +0000
commitd7b9b072229d3fa7d46917b9a76d1e70a60362d1 (patch)
tree9bbbc04e2d34587e5e951ada2be11a52a0fbb5ae /sys/kern/uipc_socket2.c
parent79fc7c81b12392575c9fde30a22de953f1a8f95b (diff)
downloadFreeBSD-src-d7b9b072229d3fa7d46917b9a76d1e70a60362d1.zip
FreeBSD-src-d7b9b072229d3fa7d46917b9a76d1e70a60362d1.tar.gz
Guard against MLEN growing larger than a uint8_t due to MSIZE grwoing to a
value of 512 in LINT. This keeps gcc from complaining.
Diffstat (limited to 'sys/kern/uipc_socket2.c')
-rw-r--r--sys/kern/uipc_socket2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/uipc_socket2.c b/sys/kern/uipc_socket2.c
index b0d366a..6feeb91 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);
OpenPOWER on IntegriCloud