Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix off-by-one, we don't want the entry point to eq...
details: https://anonhg.NetBSD.org/src/rev/78467437e5d8
branches: trunk
changeset: 359744:78467437e5d8
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Feb 23 19:43:08 2018 +0000
description:
Fix off-by-one, we don't want the entry point to equal the maximum
address.
diffstat:
sys/kern/kern_exec.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r bd2178b36b97 -r 78467437e5d8 sys/kern/kern_exec.c
--- a/sys/kern/kern_exec.c Fri Feb 23 19:39:27 2018 +0000
+++ b/sys/kern/kern_exec.c Fri Feb 23 19:43:08 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_exec.c,v 1.455 2018/01/09 20:55:43 maya Exp $ */
+/* $NetBSD: kern_exec.c,v 1.456 2018/02/23 19:43:08 maxv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.455 2018/01/09 20:55:43 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.456 2018/02/23 19:43:08 maxv Exp $");
#include "opt_exec.h"
#include "opt_execfmt.h"
@@ -430,10 +430,10 @@
if (!newerror) {
/* Seems ok: check that entry point is not too high */
- if (epp->ep_entry > epp->ep_vm_maxaddr) {
+ if (epp->ep_entry >= epp->ep_vm_maxaddr) {
#ifdef DIAGNOSTIC
printf("%s: rejecting %p due to "
- "too high entry address (> %p)\n",
+ "too high entry address (>= %p)\n",
__func__, (void *)epp->ep_entry,
(void *)epp->ep_vm_maxaddr);
#endif
Home |
Main Index |
Thread Index |
Old Index