Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/kern Pull up following revision(s) (requested by kami...
details: https://anonhg.NetBSD.org/src/rev/53c56f421bfe
branches: netbsd-9
changeset: 462660:53c56f421bfe
user: martin <martin%NetBSD.org@localhost>
date: Tue Oct 15 19:05:38 2019 +0000
description:
Pull up following revision(s) (requested by kamil in ticket #322):
sys/kern/sysv_msg.c: revision 1.76
Avoid -LONG_MIN msgtyp in msgrcv(2) and treat it as LONG_MAX
This logic (found in Linux) avoids undefined behavior.
diffstat:
sys/kern/sysv_msg.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 867943e3ebfb -r 53c56f421bfe sys/kern/sysv_msg.c
--- a/sys/kern/sysv_msg.c Tue Oct 15 19:03:20 2019 +0000
+++ b/sys/kern/sysv_msg.c Tue Oct 15 19:05:38 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysv_msg.c,v 1.74 2019/04/10 10:03:50 pgoyette Exp $ */
+/* $NetBSD: sysv_msg.c,v 1.74.4.1 2019/10/15 19:05:38 martin Exp $ */
/*-
* Copyright (c) 1999, 2006, 2007 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysv_msg.c,v 1.74 2019/04/10 10:03:50 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysv_msg.c,v 1.74.4.1 2019/10/15 19:05:38 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_sysv.h"
@@ -1104,6 +1104,7 @@
*/
if (msgtyp != msghdr->msg_type &&
+ msgtyp != LONG_MIN &&
msghdr->msg_type > -msgtyp)
continue;
Home |
Main Index |
Thread Index |
Old Index