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/1215e138b138
branches: netbsd-9
changeset: 462648:1215e138b138
user: martin <martin%NetBSD.org@localhost>
date: Tue Oct 15 18:21:06 2019 +0000
description:
Pull up following revision(s) (requested by kamil in ticket #309):
sys/kern/sys_ptrace_common.c: revision 1.67
Avoid signed integer overflow for -lwp where lwp is INT_MIN
diffstat:
sys/kern/sys_ptrace_common.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 91a19e78c6a0 -r 1215e138b138 sys/kern/sys_ptrace_common.c
--- a/sys/kern/sys_ptrace_common.c Tue Oct 15 18:17:06 2019 +0000
+++ b/sys/kern/sys_ptrace_common.c Tue Oct 15 18:21:06 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_ptrace_common.c,v 1.58 2019/07/18 20:10:46 kamil Exp $ */
+/* $NetBSD: sys_ptrace_common.c,v 1.58.2.1 2019/10/15 18:21:06 martin Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.58 2019/07/18 20:10:46 kamil Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.58.2.1 2019/10/15 18:21:06 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_ptrace.h"
@@ -1205,8 +1205,12 @@
signo = tmp;
tmp = 0; /* don't search for LWP */
}
- } else
+ } else if (tmp == INT_MIN) {
+ error = ESRCH;
+ break;
+ } else {
tmp = -tmp;
+ }
if (tmp > 0) {
if (req == PT_DETACH) {
Home |
Main Index |
Thread Index |
Old Index