diff options
author | jake <jake@FreeBSD.org> | 2002-08-29 01:28:27 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2002-08-29 01:28:27 +0000 |
commit | ef3b17314a9abf1236d4fc3c2db7aec72fe5d587 (patch) | |
tree | b89c81798efb71c0e6e53dc22a05d3d5250a04ad | |
parent | 725e38b285fff649796ffeee3005f8794c522d38 (diff) | |
download | FreeBSD-src-ef3b17314a9abf1236d4fc3c2db7aec72fe5d587.zip FreeBSD-src-ef3b17314a9abf1236d4fc3c2db7aec72fe5d587.tar.gz |
Don't require that sysentvec.sv_szsigcode be non-NULL.
-rw-r--r-- | sys/kern/kern_exec.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 292c18f..887e75f 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -835,14 +835,18 @@ exec_copyout_strings(imgp) char *stringp, *destp; register_t *stack_base; struct ps_strings *arginfo; + struct proc *p; int szsigcode; /* * Calculate string base and vector table pointers. * Also deal with signal trampoline code for this exec type. */ + p = imgp->proc; + szsigcode = 0; arginfo = (struct ps_strings *)PS_STRINGS; - szsigcode = *(imgp->proc->p_sysent->sv_szsigcode); + if (p->p_sysent->sv_szsigcode != NULL) + szsigcode = *(p->p_sysent->sv_szsigcode); destp = (caddr_t)arginfo - szsigcode - SPARE_USRSPACE - roundup((ARG_MAX - imgp->stringspace), sizeof(char *)); @@ -850,8 +854,8 @@ exec_copyout_strings(imgp) * install sigcode */ if (szsigcode) - copyout(imgp->proc->p_sysent->sv_sigcode, - ((caddr_t)arginfo - szsigcode), szsigcode); + copyout(p->p_sysent->sv_sigcode, ((caddr_t)arginfo - + szsigcode), szsigcode); /* * If we have a valid auxargs ptr, prepare some room |