From 142b7761cc8697546dc852e4d22e380463a1a584 Mon Sep 17 00:00:00 2001 From: kib Date: Thu, 16 May 2019 13:00:35 +0000 Subject: [PATCH] arm64: bzero buffer for ucontext in freebsd32_swapcontext(). This change is the same as r340994 for amd64. PR: 237922 Submitted by: Young MFC after: 3 days --- sys/arm64/arm64/freebsd32_machdep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/arm64/arm64/freebsd32_machdep.c b/sys/arm64/arm64/freebsd32_machdep.c index a6719b6e436..aeac4605f2f 100644 --- a/sys/arm64/arm64/freebsd32_machdep.c +++ b/sys/arm64/arm64/freebsd32_machdep.c @@ -284,6 +284,7 @@ freebsd32_swapcontext(struct thread *td, struct freebsd32_swapcontext_args *uap) if (uap->oucp == NULL || uap->ucp == NULL) ret = EINVAL; else { + bzero(&uc, sizeof(uc)); get_mcontext32(td, &uc.uc_mcontext, GET_MC_CLEAR_RET); PROC_LOCK(td->td_proc); uc.uc_sigmask = td->td_sigmask; -- 2.45.0