Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src/sys/kern Pull up following revision(s) (requested by nath...
details: https://anonhg.NetBSD.org/src/rev/f50b91a186c2
branches: netbsd-3
changeset: 577405:f50b91a186c2
user: riz <riz%NetBSD.org@localhost>
date: Sat Oct 22 03:54:33 2005 +0000
description:
Pull up following revision(s) (requested by nathanw in ticket #911):
sys/kern/uipc_socket.c: revision 1.112
Check the argument to SO_LINGER.
diffstat:
sys/kern/uipc_socket.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (30 lines):
diff -r 36ca33d94ac2 -r f50b91a186c2 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Sat Oct 22 03:52:18 2005 +0000
+++ b/sys/kern/uipc_socket.c Sat Oct 22 03:54:33 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.108 2005/02/26 21:34:55 perry Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.108.2.1 2005/10/22 03:54:33 riz Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.108 2005/02/26 21:34:55 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.108.2.1 2005/10/22 03:54:33 riz Exp $");
#include "opt_sock_counters.h"
#include "opt_sosend_loan.h"
@@ -1405,6 +1405,11 @@
error = EINVAL;
goto bad;
}
+ if (mtod(m, struct linger *)->l_linger < 0 ||
+ mtod(m, struct linger *)->l_linger > (INT_MAX / hz)) {
+ error = EDOM;
+ goto bad;
+ }
so->so_linger = mtod(m, struct linger *)->l_linger;
/* fall thru... */
Home |
Main Index |
Thread Index |
Old Index