Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Check .evs_used==0 instead of .evs_cmds==NULL. evs_...



details:   https://anonhg.NetBSD.org/src/rev/74040e82d86f
branches:  trunk
changeset: 797118:74040e82d86f
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Jul 06 07:41:41 2014 +0000

description:
Check .evs_used==0 instead of .evs_cmds==NULL. evs_cmds would not be NULL if
another _makecmds() had allocated and deallocated VMCMDs (not the case
currently).

diffstat:

 sys/kern/exec_elf.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r e3f3261dd793 -r 74040e82d86f sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c       Sun Jul 06 06:34:33 2014 +0000
+++ b/sys/kern/exec_elf.c       Sun Jul 06 07:41:41 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.c,v 1.67 2014/06/25 17:10:39 christos Exp $   */
+/*     $NetBSD: exec_elf.c,v 1.68 2014/07/06 07:41:41 maxv Exp $       */
 
 /*-
  * Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.67 2014/06/25 17:10:39 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.68 2014/07/06 07:41:41 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -789,7 +789,7 @@
                }
        }
 
-       if (epp->ep_vmcmds.evs_cmds == NULL) {
+       if (epp->ep_vmcmds.evs_used == 0) {
                /* No VMCMD; there was no PT_LOAD section, or those
                 * sections were empty */
                error = ENOEXEC;



Home | Main Index | Thread Index | Old Index