Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sys/kern fix overflow in sendmsg() -- requested by Davi...
details: https://anonhg.NetBSD.org/src/rev/07e605c36d95
branches: netbsd-1-4
changeset: 471305:07e605c36d95
user: perry <perry%NetBSD.org@localhost>
date: Thu Jul 19 13:52:19 2001 +0000
description:
fix overflow in sendmsg() -- requested by David Maxwell
diffstat:
sys/kern/uipc_syscalls.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (22 lines):
diff -r 2ed0be0ae780 -r 07e605c36d95 sys/kern/uipc_syscalls.c
--- a/sys/kern/uipc_syscalls.c Thu Jul 19 13:36:19 2001 +0000
+++ b/sys/kern/uipc_syscalls.c Thu Jul 19 13:52:19 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_syscalls.c,v 1.41.2.1 1999/06/21 19:22:11 cgd Exp $ */
+/* $NetBSD: uipc_syscalls.c,v 1.41.2.2 2001/07/19 13:52:19 perry Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1990, 1993
@@ -1031,9 +1031,10 @@
/*
* We can't allow socket names > UCHAR_MAX in length, since that
- * will overflow sa_len.
+ * will overflow sa_len. Control data more than a page size in
+ * length is just too much.
*/
- if (type == MT_SONAME && (u_int)buflen > UCHAR_MAX)
+ if ((u_int)buflen > (type == MT_SONAME ? UCHAR_MAX : PAGE_SIZE))
return (EINVAL);
/* Allocate an mbuf to hold the arguments. */
Home |
Main Index |
Thread Index |
Old Index