diff options
author | Toomas Soome <tsoome@me.com> | 2020-04-11 00:05:31 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2020-04-24 21:03:27 +0300 |
commit | 12551037071c8ef2216bb540edd94a5bff5e90ae (patch) | |
tree | 952bbc44a4a8d7a8c077fb181bba89e79b62177b /usr/src/uts/sparc/syscall/getcontext.c | |
parent | 13c31a0ee516ab913296f7367d3c09a79ff3ba21 (diff) | |
download | illumos-joyent-12551037071c8ef2216bb540edd94a5bff5e90ae.tar.gz |
12532 unix: NULL pointer errors
Reviewed by: Gary Mills <gary_mills@fastmail.fm>
Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/uts/sparc/syscall/getcontext.c')
-rw-r--r-- | usr/src/uts/sparc/syscall/getcontext.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr/src/uts/sparc/syscall/getcontext.c b/usr/src/uts/sparc/syscall/getcontext.c index c9adb54b86..aa933e5d23 100644 --- a/usr/src/uts/sparc/syscall/getcontext.c +++ b/usr/src/uts/sparc/syscall/getcontext.c @@ -25,7 +25,7 @@ */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ -/* All Rights Reserved */ +/* All Rights Reserved */ #include <sys/param.h> #include <sys/types.h> @@ -87,7 +87,7 @@ savecontext(ucontext_t *ucp, const k_sigset_t *mask) * been disabled for this LWP. If stack bounds checking is disabled * or the copyin() fails, we fall back to the legacy behavior. */ - if (lwp->lwp_ustack == NULL || + if (lwp->lwp_ustack == (uintptr_t)NULL || copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, sizeof (ucp->uc_stack)) != 0 || ucp->uc_stack.ss_size == 0) { @@ -384,7 +384,7 @@ savecontext32(ucontext32_t *ucp, const k_sigset_t *mask, struct fq32 *dfq) * been disabled for this LWP. If stack bounds checking is disabled * or the copyin() fails, we fall back to the legacy behavior. */ - if (lwp->lwp_ustack == NULL || + if (lwp->lwp_ustack == (uintptr_t)NULL || copyin((void *)lwp->lwp_ustack, &ucp->uc_stack, sizeof (ucp->uc_stack)) != 0 || ucp->uc_stack.ss_size == 0) { @@ -410,7 +410,7 @@ savecontext32(ucontext32_t *ucp, const k_sigset_t *mask, struct fq32 *dfq) if (ucp->uc_mcontext.fpregs.fpu_en == 0) ucp->uc_flags &= ~UC_FPU; - ucp->uc_mcontext.gwins = (caddr32_t)NULL; + ucp->uc_mcontext.gwins = (caddr32_t)(uintptr_t)NULL; /* * Save signal mask (the 32- and 64-bit sigset_t structures are @@ -464,7 +464,7 @@ getsetcontext32(int flag, void *arg) * a later setcontext(2). */ uc.uc_mcontext.fpregs.fpu_qcnt = 0; - uc.uc_mcontext.fpregs.fpu_q = (caddr32_t)NULL; + uc.uc_mcontext.fpregs.fpu_q = (caddr32_t)(uintptr_t)NULL; if (copyout(&uc, arg, sizeof (ucontext32_t))) return (set_errno(EFAULT)); |