Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-2-0]: src/sys/kern Pull up following revision(s) (requested by na...
details: https://anonhg.NetBSD.org/src/rev/129ae7cfa6fd
branches: netbsd-2-0
changeset: 564896:129ae7cfa6fd
user: tron <tron%NetBSD.org@localhost>
date: Mon Oct 31 13:37:33 2005 +0000
description:
Pull up following revision(s) (requested by nathanw in ticket #5939):
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 97f8808dd77d -r 129ae7cfa6fd sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c Sun Oct 30 17:42:41 2005 +0000
+++ b/sys/kern/uipc_socket.c Mon Oct 31 13:37:33 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_socket.c,v 1.97.2.1 2004/05/26 20:14:40 he Exp $ */
+/* $NetBSD: uipc_socket.c,v 1.97.2.2 2005/10/31 13:37:33 tron 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.97.2.1 2004/05/26 20:14:40 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.97.2.2 2005/10/31 13:37:33 tron Exp $");
#include "opt_sock_counters.h"
#include "opt_sosend_loan.h"
@@ -1391,6 +1391,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