Mercurial > illumos > git > illumos-omnios
changeset 18402:c2214913700a
OS-3733 Verify b_native_exec exists before calling it
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
author | Patrick Mooney <patrick.f.mooney@gmail.com> |
---|---|
date | Tue, 07 Apr 2015 21:10:24 +0000 |
parents | 37eb6f501f11 |
children | e8188476e197 |
files | usr/src/uts/common/exec/elf/elf.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/exec/elf/elf.c Fri Apr 03 20:22:20 2015 +0000 +++ b/usr/src/uts/common/exec/elf/elf.c Tue Apr 07 21:10:24 2015 +0000 @@ -404,8 +404,8 @@ * execution of a non-illumos binary in the form of /bin/ls will still * be branded and be subject to all of the normal actions of the brand. */ - if ((level <= INTP_MAXDEPTH) && - (*brand_action != EBA_NATIVE) && (PROC_IS_BRANDED(p))) { + if ((level <= INTP_MAXDEPTH) && (*brand_action != EBA_NATIVE) && + (PROC_IS_BRANDED(p)) && (BROP(p)->b_native_exec != NULL)) { if (BROP(p)->b_native_exec(ehdrp->e_ident[EI_OSABI], &args->brand_nroot) == B_TRUE) { ASSERT(ehdrp->e_ident[EI_OSABI]);